https://github.com/humanmade/hm-proxy
A simple script to proxy from your computer
https://github.com/humanmade/hm-proxy
Last synced: 4 months ago
JSON representation
A simple script to proxy from your computer
- Host: GitHub
- URL: https://github.com/humanmade/hm-proxy
- Owner: humanmade
- Created: 2015-07-29T11:27:25.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-01-06T07:42:32.000Z (almost 5 years ago)
- Last Synced: 2025-06-30T16:14:52.482Z (4 months ago)
- Size: 17.6 KB
- Stars: 10
- Watchers: 22
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
HM Proxy
========
A super simple script to connect to the closest proxy to you automatically.
Must be run with sudo.
```
usage: hmproxy [options] []
One of:
on Connect to the proxy connection
off Disconnect from the proxy connection
sh/ssh Open a shell to the proxy
(Reuses the connection; nice and fast!)
run (default) Connect and keep in foreground
(Allows exiting with Ctrl-C)
--github
Proxy all SSH connections (e.g git@github.com) to GitHub
-r, --region
One of EU/AU/US-WEST/US-EAST
Default is geolocated from your IP.
-p, --port
Port to connect to proxy on
Default is 22, use 443 if proxy is blocked
-s, --service
Network service to enable the proxy on
Default is your top enabled network ('Wi-Fi')
-u, --user
Proxy username
Default is local username ('root')
```
## Install
To install:
* Clone this repo
* `cd` into the new directory
* Run `./hmproxy`
To make it available everywhere:
* `cd` into the `hmproxy` directory
* `ln -s $PWD/hmproxy /usr/local/bin/hmproxy`
If the `/usr/local/bin` directory does not exist yet you can create it first by running the following command:
```
sudo mkdir /usr/local/bin
```
## Examples
For example, I run it as follows:
```
sudo hmproxy -u ryan
```
If I'm in a cafe that blocks port 22:
```
sudo hmproxy -u ryan -p 443
```
If I'm in a cafe in Berlin, and want to force EU-Central:
```
sudo hmproxy -u ryan -p 443 -r eu-central
```
## FAQ
### Why does it pick the wrong service (e.g. Bluetooth instead of Wi-Fi)?
HM Proxy tries to pick the right service, but it may be picking the wrong one if your system order is set incorrectly.
To fix this, open `System Preferences > Network`, click the gear, and select "Set Service Order..."
If you just want to do it for a one-off request, use `-s` or `--service`