capacitor-proxy-network-details
v0.0.2
Published
CapacitorJS plugin to fetch proxy details from a mobile device, as defined in its network settings.
Readme
capacitor-proxy-network-details
CapacitorJS plugin to fetch proxy details from a mobile device, as defined in its network settings.
Install
npm install capacitor-proxy-network-details
npx cap syncAPI
getProxy()
getProxy() => Promise<ProxyResult>Returns: Promise<ProxyResult>
Interfaces
ProxyResult
| Prop | Type |
| ---------- | --------------------------- |
| host | string | null |
| port | number | null |
Example
import { ProxyDetails } from 'capacitor-proxy-network-details';
const { host, port } = await ProxyDetails.getProxy();
if (host && port) {
console.log(`Proxy: ${host}:${port}`);
} else {
console.log('No proxy configured');
}Upcoming features
- iOS support
- PAC handling
- VPN-aware logic
