1.0.0 • Published 7 years ago

os-proxy-socks v1.0.0

Weekly downloads
2
License
ISC
Repository
-
Last release
7 years ago

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