Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jun7th/tsocks
A reverse socks5 proxy server with ssl(一个Socks5代理服务器程序)
https://github.com/jun7th/tsocks
Last synced: 25 days ago
JSON representation
A reverse socks5 proxy server with ssl(一个Socks5代理服务器程序)
- Host: GitHub
- URL: https://github.com/jun7th/tsocks
- Owner: jun7th
- License: agpl-3.0
- Created: 2016-12-20T13:49:18.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-03-15T07:04:19.000Z (over 8 years ago)
- Last Synced: 2024-08-03T17:12:20.545Z (4 months ago)
- Language: Python
- Homepage:
- Size: 17.8 MB
- Stars: 23
- Watchers: 3
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-network-stuff - **8**星
README
# tsocks
A reverse socks5 proxy server whith port forwarding mode and forward server modeSocks is a small program that has socks5 reverse proxy functionality, with the port forwarding agent can archieve intranet to intranet, but also has a positive socks5 proxy server.
Usage:### 1. On the server has two network cards, one of the card is connected within a intranet, another cards connect to internet (public network ip):
```
On the target server run:
tsocks -s -p 1080
Use socks proxy server to connect to this server's public network ip and 1080 ports.
```
### 2. The target server in the intranet, our machine is also in the intranet:
```
First on the internet server(if iP is 1.1.1.1) run:
tsocks -f 8001 8002
ON the intranet server run:
tsocks -s -r 1.1.1.1 -p 8001
In this machine socks5 proxy connection port VPS 8002
```
## or use ssl:
```
First on the internet server(if iP is 1.1.1.1) run:
tsocks -f 443 8002 -S -c cert.pem
ON the intranet server run:
tsocks -s -S -r 1.1.1.1 -p 443
In this machine socks5 proxy connection port VPS 8002
```# tsocks
Tsocks是一个具有socks5反向代理功能的小程序,配合端口转发可以实现内网通内网的功能,同时也具有正向socks5代理服务器功能。
用法:
### 1.在具有两块网卡的服务器上,网卡一连接内网,网卡二连接外网(公网ip):
```
在目标服务器上运行:
tsocks -s -p 1080
使用socks代理服务器连接这台服务器的公网ip和1080端口。
```
### 2.目标服务器处于内网,本机也处于内网:
```
首先在公网服务器(假如ip是 1.1.1.1)上面运行:
tsocks -f 8001 8002
在内网服务器上面运行:
tsocks -s -r 1.1.1.1 -p 8001
在本机使用socks5代理连接vps的8002端口
```
## 或者使用ssl:
```
首先在公网服务器(假如ip是 1.1.1.1)上面运行:
tsocks -f 443 8002 -S -c cert.pem
在内网服务器上面运行:
tsocks -s -S -r 1.1.1.1 -p 443
在本机使用socks5代理连接vps的8002端口
``````
usage: tsocks [options]
tsocks -s -p 1028 Socks5 server mode
tsocks -s -r 1.1.1.1 -p 8001 Reverse socks5 server mode
tsocks -f 8001 8002 Port forward mode
tsocks -s -S -r 1.1.1.1 -p 443 Reverse socks5 over ssl
tsocks -f 443 8002 -S -c cert.pem Port forward over ssl
-----------------------------------------------------------------------
generate cert:
openssl req -new -x509 -keyout cert.pem -out cert.pem -days 1095 -nodestsocks v1.0
optional arguments:
-h, --help show this help message and exit
-s, --server Socks5 server mode (default: False)
-p PORT, --port PORT Socks5 server mode listen port or remote port
(default: 1080)
-r REMOTE_IP, --remote REMOTE_IP
Reverse socks5 server mode ,set remote relay IP
(default: None)
-f PORT_1 PORT_2, --forward PORT_1 PORT_2
Set forward mode,server connect port_1,client connect
port_2 (default: None)
-d, --debug Set debug mode,will show debug information (default:
False)
-S, --ssl Set use ssl,just support reverse proxy mode,relay
server must also use ssl (default: False)
-c CERT_FILE, --cert CERT_FILE
Set ssl cert file path,only set relay server (default:
cert.pem)```