os-proxy-socks
v1.0.0
Published
WIP: Manage system-wide SOCKS proxy settings.
Downloads
3
Readme
os-proxy-socks
WIP: Manage system-wide SOCKS proxy settings.
Platform
- osx
Usage
Get current setting:
import { get } from 'os-proxy-socks'
get().then(options => {
console.log(options.enable) // true
console.log(options.server) // 127.0.0.1
console.log(options.port) // 1080
})
Set SOCKS setting:
import { set } from 'os-proxy-socks'
const options = {
server: '127.0.0.1',
port: 1080,
auth: {
name: 'name',
password: 'password',
}
}
set(options).then(() => {
// ...
}).catch(err => console.error(err))
API
get()
Test
npm run test