|
1 | | -# Tunn - SSH Tunneling Tool |
| 1 | +# Tunn |
2 | 2 |
|
3 | | -A cross-platform SSH tunneling tool that creates secure connections through direct connections over WebSocket and HTTP proxies. |
4 | | - |
5 | | -## Features |
6 | | - |
7 | | -- **Multiple tunnel modes**: Direct connection and Proxy |
8 | | -- **WebSocket-based SSH tunnels** for better bypass capabilities |
9 | | -- **SOCKS5 and HTTP proxy support** |
10 | | -- **Domain spoofing** capabilities |
11 | | -- **Cross-platform** (Windows, Linux, macOS) |
| 3 | +A minimal, cross-platform SSH WebSocket tunneling tool for free internet. |
12 | 4 |
|
13 | 5 | ## Installation |
14 | 6 |
|
15 | | -Download the latest binary from the [releases page](../../releases) or build from source: |
16 | | - |
17 | 7 | ```bash |
18 | 8 | go install github.com/FreeNetLabs/tunn@latest |
19 | 9 | ``` |
20 | 10 |
|
21 | | -## Quick Start |
| 11 | +## Usage |
22 | 12 |
|
23 | | -1. Generate a configuration file: |
24 | | -```bash |
25 | | -tunn config generate --mode direct --output config.json |
26 | | -``` |
| 13 | +1. Create a `config.json` file: |
27 | 14 |
|
28 | | -2. Edit the configuration with your details: |
29 | 15 | ```json |
30 | 16 | { |
31 | | - "mode": "direct", |
32 | | - "ssh": { |
33 | | - "host": "www.ayanrajpoot.net", |
34 | | - "port": 80, |
35 | | - "username": "abc", |
36 | | - "password": "1234" |
| 17 | + "host": "example.com", |
| 18 | + "port": 22, |
| 19 | + "auth": { |
| 20 | + "user": "root", |
| 21 | + "pass": "secret" |
37 | 22 | }, |
38 | | - "listener": { |
39 | | - "port": 1080, |
40 | | - "proxyType": "http" |
| 23 | + "local": { |
| 24 | + "type": "http", |
| 25 | + "port": 1080 |
41 | 26 | }, |
42 | | - "httpPayload": "GET / HTTP/1.1[crlf]Host: api.ril.com[crlf]Upgrade: websocket[crlf][crlf]", |
43 | | - "connectionTimeout": 30 |
| 27 | + "payload": "GET / HTTP/1.1\r\nHost: example.com\r\nUpgrade: websocket\r\n\r\n", |
| 28 | + "timeout": 30, |
| 29 | + "tls": { |
| 30 | + "sni": "example.com" |
| 31 | + } |
44 | 32 | } |
45 | 33 | ``` |
46 | 34 |
|
47 | | -3. Run Tunn: |
| 35 | +2. Run the tunnel: |
| 36 | + |
48 | 37 | ```bash |
49 | | -tunn --config config.json |
| 38 | +tunn -config config.json |
50 | 39 | ``` |
51 | 40 |
|
52 | | -4. Configure your applications to use the proxy at `127.0.0.1:1080` |
53 | | - |
54 | | -## Configuration |
55 | | - |
56 | | -### Tunnel Modes |
57 | | - |
58 | | -- **Direct Mode**: Direct connection with optional domain spoofing |
59 | | -- **Proxy Mode**: Routes through HTTP proxy → WebSocket → SSH server |
60 | | - |
61 | | -### Required Fields |
62 | | -- `mode`: "direct" or "proxy" |
63 | | -- `ssh.host`: SSH server hostname |
64 | | -- `ssh.username` and `ssh.password`: SSH credentials |
65 | | - |
66 | | -### Optional Fields |
67 | | -- `listener.port`: Local proxy port (default: 1080) |
68 | | -- `listener.proxyType`: "socks5" or "http" (default: "socks5") |
69 | | -- `connectionTimeout`: Connection timeout in seconds (default: 30) |
70 | | - |
71 | | -## Usage Examples |
72 | | - |
73 | | -### Browser Configuration |
74 | | -Set your browser to use HTTP/SOCKS5 proxy at `127.0.0.1:1080` |
75 | | - |
76 | | -### System-Wide Proxy |
77 | | -Configure your system proxy settings to use `127.0.0.1:1080` (SOCKS5) or `127.0.0.1:1080` (HTTP) for system-wide tunneling. |
| 41 | +3. Connect your applications through the local proxy at `127.0.0.1:1080`. |
78 | 42 |
|
79 | 43 | ## License |
80 | 44 |
|
81 | | -MIT License - see LICENSE file for details. |
| 45 | +MIT License |
| 46 | + |
0 commit comments