https://github.com/getlantern/sysproxy-cmd
Command-line tool for setting HTTP(S) system proxy
https://github.com/getlantern/sysproxy-cmd
Last synced: 8 months ago
JSON representation
Command-line tool for setting HTTP(S) system proxy
- Host: GitHub
- URL: https://github.com/getlantern/sysproxy-cmd
- Owner: getlantern
- License: apache-2.0
- Created: 2016-10-07T00:58:24.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-10-21T15:14:02.000Z (over 1 year ago)
- Last Synced: 2025-05-14T22:42:11.075Z (about 1 year ago)
- Language: C
- Size: 709 KB
- Stars: 32
- Watchers: 11
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sysproxy-cmd
A command line tool to change HTTP(s) proxy settings of the operating system.
Binaries included in repo. Simply `make` to build it again, with the important exception of darwin, which uses its own repository and build at https://github.com/getlantern/sysproxy-cmd-darwin.
Note - you will need to run make separately on each platform.
# Usage
```sh
sysproxy show
sysproxy on
sysproxy off
sysproxy wait-and-cleanup
```
`sysproxy off` and `sysproxy wait-and-cleanup` turns off proxy setting only if the
existing host and port equal .
`sysproxy wait-and-cleanup` differs from `sysproxy off` in that it waits for input
from stdin (or close) before turning off proxy setting. Any signal or Windows
system shutdown message triggers the cleanup too.
# Notes
* **Mac**
Setting the system proxy is a privileged action on Mac OS. `sudo` or elevate it
as below.
There's an additional option to chown itself to root:wheel and add setuid bit.
```sh
sysproxy setuid
```
* **Windows**
Install [MinGW-W64](http://sourceforge.net/projects/mingw-w64) to build sysproxy
as it has up to date SDK headers we require. The make command is `mingw32-make`.
To avoid bringing up console window, it doesn't show anything directly to
console. Piping the result to other utilities should work.
```
sysproxy show | cat
```
* **Linux**
`sudo apt-get install libgtk2.0-dev`