You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README_EN.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,9 +101,10 @@ encryption_algorithm=AES-GCM
101
101
| Name | Possible Values | Required | Remarks |
102
102
| ---- | ---- | ---- | ---- |
103
103
| mode | client<br>server | Yes | Choose between client and server mode |
104
+
| listen_on | domain name or IP address |No|domain name / IP address only. Multiple addresses should be comma-separated.|
104
105
| listen_port | 1 - 65535 | Yes | Specify the port range when running as a server |
105
106
| destination_port | 1 - 65535 | Yes | Specify the port range when running as a client |
106
-
| destination_address | IP address, domain name | Yes | When inputting an IPv6 address, no need for square brackets|
107
+
| destination_address | IP address, domain name | Yes | When inputting an IPv6 address, no need for square brackets. Multiple addresses should be comma-separated.|
107
108
| dport_refresh | 20 - 65535 | No | Unit: seconds. Default value is 60 seconds. If less than 20 seconds, it will be considered as 20 seconds; if greater than 65535, it will be considered as 65536 seconds |
108
109
| encryption_algorithm| AES-GCM<br>AES-OCB<br>chacha20<br>xchacha20 | No | Select from AES-256-GCM-AEAD, AES-256-OCB-AEAD, ChaCha20-Poly1305, XChaCha20-Poly1305 |
109
110
| encryption_password | Any characters | Depending on situation | Required when setting encryption_algorithm |
Copy file name to clipboardExpand all lines: docs/client_server_en.md
+39-1Lines changed: 39 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ stun_server=stun.qq.com
90
90
log_path=./
91
91
```
92
92
93
-
When using STUN for NAT Hole punching, the server cannot listen on multiple ports and can only use single-port mode. This is because the port number obtained after NAT Hole punching using STUN is not fixed. Even if the server's own port range is continuous, it cannot be guaranteed that the port number range obtained during NAT Hole punching is also continuous. Therefore, in this mode, UDPHop is limited to using only single-port mode.
93
+
When using STUN for NAT Hole punching, the server cannot listen on multiple ports and can only use single-port mode; listening multiple address can't be supported. This is because the port number obtained after NAT Hole punching using STUN is not fixed. Even if the server's own port range is continuous, it cannot be guaranteed that the port number range obtained during NAT Hole punching is also continuous. Therefore, in this mode, UDPHop is limited to using only single-port mode.
94
94
95
95
## Specify the listening NIC
96
96
@@ -100,6 +100,44 @@ Both the client and the server can specify the NIC to listen to, and only need t
100
100
listen_on=192.168.1.1
101
101
```
102
102
103
+
or multiple addresses
104
+
105
+
```
106
+
listen_on=192.168.1.1,172.16.20.1
107
+
```
108
+
109
+
## Multiple Destination Addresses
110
+
111
+
Both client and relay modes can specify multiple destination addresses, which must point to the same server.
112
+
113
+
```
114
+
destination_address=127.0.0.1,::1,10.200.30.1
115
+
```
116
+
117
+
**Note**: When using multiple addresses, it is recommended that the client's `destination_address` matches the server's `listen_on`.
118
+
119
+
If the server's `listen_on` is not specified, ensure that each address in the client's `destination_address` is in a different network segment.
120
+
121
+
For example, if the client specifies `destination_address=192.168.0.1,FDCA:1234::1`, the server's `listen_on` can be left blank, since `192.168.0.1` and `FDCA:1234::1` are guaranteed to be in different network segments.
122
+
123
+
However, if the client specifies `destination_address=192.168.0.1,192.168.0.2,FDCA:1234::1,FDCA:1234::2`, it is better to explicitly specify these addresses in the server's `listen_on` to avoid data packets being sent from unintended addresses.
124
+
125
+
## Non-continuous Port Range
126
+
127
+
To use a non-continuous port range, you can separate the ranges with commas.
128
+
129
+
### Server
130
+
131
+
```
132
+
listen_port=13000-13050,14000-14050,15000
133
+
```
134
+
135
+
### Client
136
+
137
+
```
138
+
destination_port=13000-13050,14000-14050,15000
139
+
```
140
+
103
141
## Multiple Configuration Files
104
142
105
143
If you want to listen to multiple ports and multiple NICs, you can pass multiple configuration files to kcptube and use them at the same time
0 commit comments