https://github.com/yryz/tcpforward
https://github.com/yryz/tcpforward
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yryz/tcpforward
- Owner: yryz
- Created: 2021-04-10T13:27:43.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-10T14:04:44.000Z (about 4 years ago)
- Last Synced: 2025-01-15T20:33:01.129Z (4 months ago)
- Language: Go
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
安全的tcp转发,支持tls双向认证,支持Socks代理。
可以用来作为内网跳板,也可以用来对普通tcp增加tls安全认证。
`go get github.com/yryz/tcpforward`
# EXAMPLES
**tcp -> tcp**
local: `tcpforward -t tcp -l 127.0.0.1:1080 -T tcp -P 192.168.10.1:1080`**tcp -> |tls| -> tcp**
1. gen cert.pem & key.pem: `tcpforward -gencert`
2. local: `tcpforward -t tcp -l 127.0.0.1:1080 -T tls -P 192.168.10.1:2080 -C cert.pem -K key.pem`
3. remote: `tcpforward -t tls -l 192.168.10.1:2080 -T tcp -P 127.0.0.1:1080 -C cert.pem -K key.pem`**tcp -> |socks| + |tls| -> tcp**
1. gen cert.pem & key.pem: `tcpforward -gencert`
2. local: `ALL_PROXY=socks5://username:passwd@host:port tcpforward -t tcp -l 127.0.0.1:1080 -T tls -P 192.168.10.1:2080 -C cert.pem -K key.pem`
3. remote: `tcpforward -t tls -l 192.168.10.1:2080 -T tcp -P 127.0.0.1:1080 -C cert.pem -K key.pem`