Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/humanmade/hm-proxy

A simple script to proxy from your computer
https://github.com/humanmade/hm-proxy

Last synced: 3 months ago
JSON representation

A simple script to proxy from your computer

Lists

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 [email protected]) 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`