Improve README.md format

This commit is contained in:
Peter Dave Hello 2018-07-14 21:59:02 +08:00
parent 952bef97f1
commit 256749bd6a

View file

@ -16,6 +16,7 @@ The super easy way to setup a [Tor](https://www.torproject.org) [SOCKS5](https:/
## How to use?
1. Setup the proxy server at the **first time**
```sh
$ docker run -d --name tor_socks_proxy -p 127.0.0.1:9150:9150 peterdavehello/tor-socks-proxy:latest
```
@ -25,11 +26,13 @@ The super easy way to setup a [Tor](https://www.torproject.org) [SOCKS5](https:/
- Do not touch the second `9150` as it's the port inside the docker container unless you're going to change the port in Dockerfile.
If you already setup the instance before *(not the first time)*, just start it:
```
```sh
$ docker start tor_socks_proxy
```
2. Make sure it's running, it'll take a short time to bootstrap
```
$ docker logs tor_socks_proxy
.
@ -44,6 +47,7 @@ The super easy way to setup a [Tor](https://www.torproject.org) [SOCKS5](https:/
3. Configure your client to use it, target on `127.0.0.1` port `9150`(Or the other port you setup in step 1)
Take `curl` as an example, checkout what's your IP address via Tor network:
```sh
$ curl --socks5-hostname 127.0.0.1:9150 ipinfo.io/ip
$ curl --socks5-hostname 127.0.0.1:9150 icanhazip.com
@ -52,18 +56,21 @@ The super easy way to setup a [Tor](https://www.torproject.org) [SOCKS5](https:/
```
Take `ssh` and `nc` as an example, connect to a host via Tor:
```sh
$ ssh -o ProxyCommand='nc -x 127.0.0.1:9150 %h %p' target.hostname.blah
```
4. After using it, you can turn it off
```sh
$ docker stop tor_socks_proxy
```
## How to renew IP?
- To renew the IP that Tor gives you, simply restart your docker container:
- To renew the IP that Tor gives you, simply restart your docker container:
```sh
$ docker restart tor_socks_proxy
```