https://github.com/getlantern/pac
A simple Go library to toggle on and off system pac for various OS
https://github.com/getlantern/pac
Last synced: 8 months ago
JSON representation
A simple Go library to toggle on and off system pac for various OS
- Host: GitHub
- URL: https://github.com/getlantern/pac
- Owner: getlantern
- Created: 2015-01-21T02:37:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-10-19T16:27:58.000Z (over 9 years ago)
- Last Synced: 2024-06-18T21:35:54.659Z (almost 2 years ago)
- Language: Go
- Size: 561 KB
- Stars: 18
- Watchers: 20
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pac
[pac](https://github.com/getlantern/pac) is a simple Go library to toggle on and
off pac(proxy auto configuration) for Windows, Mac OS and Linux. It will extract
a helper tool and use it to actually chage pac.
```go
pac.EnsureHelperToolPresent(fullPath, prompt, iconFullPath)
pac.On(pacUrl string)
pac.Off()
```
See 'example/main.go' for detailed usage.
### Embedding pac-cmd
pac uses binaries from the [pac-cmd](https://github.com/getlantern/pac-cmd) project.
To embed the binaries for different platforms, use the `pac2go.sh` script. This
script takes care of code signing the Windows and OS X executables.
This script signs the Windows executable, which requires that
[osslsigncode](http://sourceforge.net/projects/osslsigncode/) utility be
installed. On OS X with homebrew, you can do this with
`brew install osslsigncode`.
You will also need to set the environment variables BNS_CERT and BNS_CERT_PASS
to point to [bns-cert.p12](https://github.com/getlantern/too-many-secrets/blob/master/bns_cert.p12)
and its [password](https://github.com/getlantern/too-many-secrets/blob/master/build-installers/env-vars.txt#L3)
so that the script can sign the Windows executable.
This script also signs the OS X executable, which requires you to install our
OS X signing certificate, available
[here](https://github.com/getlantern/too-many-secrets/blob/master/osx-code-signing-certificate.p12).
The password is [here](https://github.com/getlantern/too-many-secrets/blob/master/osx-code-signing-certificate.p12.txt).