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
| listen_port | 1 - 65535 | Yes | Specify the port range when running as a server |
106
106
| destination_port | 1 - 65535 | Yes | Specify the port range when running as a client |
107
107
| destination_address | IP address, domain name | Yes | When inputting an IPv6 address, no need for square brackets. Multiple addresses should be comma-separated.|
108
+
| destination_dnstxt | Domain name | No |Accepts a single domain name, for client use only. Retrieves the IP address and port from a DNS TXT record. When this parameter is used, destination_address and destination_port are not required.|
108
109
| 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 |
| encryption_password | Any character |Depends…|…on the setting of encryption_algorithm, if the value is set and it is neither `none` nor `XOR`, it is required|
111
112
| timeout | 0 - 65535 | No | Unit: seconds. Default value is 1800. Set to 0 to use the default value. Represents the timeout setting between the UDP application and udphop |
112
113
| keep_alive | 0 - 65535 | No | Default value is 0, which means Keep Alive is disabled |
113
114
| stun_server | STUN server address | No | Cannot be used when listen_port is in port range mode |
115
+
| update_ipv4 | Path to an executable file | No |Used for processing the public IPv4 address obtained from STUN. See documentation below for details.|
116
+
| update_ipv6 | Path to an executable file | No |Used for processing the public IPv6 address obtained from STUN. See documentation below for details.|
114
117
| log_path | Directory for storing logs | No | Should point to a directory, not a file itself. If not needed, remove this line |
115
118
| ipv4_only | yes<br>true<br>1<br>no<br>false<br>0 | No | If IPv6 is disabled on the system, enable this option and set to yes, true, or 1 |
@@ -125,7 +128,7 @@ For example, you can input `fec=20:4`, which means for every 20 data packets sen
125
128
126
129
**Reminder**: It is not recommended for OpenVPN using AEAD encryption mode to use this feature, because OpenVPN's tolerance for out-of-order packets is very poor under this circumstance, and UDPHop is not responsible for reordering packets, even for FEC-recovered data.
127
130
128
-
#### 中继模式
131
+
#### Relay Mode
129
132
Please refer to [The Usage of Relay Mode](docs/relay_mode_en.md).
130
133
131
134
### Log Files
@@ -137,6 +140,32 @@ The obtained punched address will also be displayed in the console.
137
140
138
141
If log writing is not needed, then remove the `log_path` line.
139
142
143
+
### STUN Options
144
+
145
+
These three parameters are limited to server and relay modes:
146
+
-`stun_server`
147
+
-`update_ipv4`
148
+
-`update_ipv6`
149
+
150
+
Once `update_ipv4` or `update_ipv6` is set, the program will execute the corresponding script, passing the IP address and port obtained from STUN to it.
151
+
152
+
For example, given the following settings:
153
+
```
154
+
update_ipv4=/home/test/update_to_dnsv4
155
+
update_ipv6=/home/test/update_to_dnsv6
156
+
```
157
+
158
+
If the address and port obtained from STUN are `130.131.132.133` and `23456` respectively, the file executed and the arguments passed will be:
159
+
160
+
```
161
+
/home/test/update_to_dnsv4 130.131.132.133:23456
162
+
```
163
+
164
+
If the address and port obtained are `2409:ABCD:FEDC:3210::1` and `23456` respectively, the file executed and the arguments passed will be:
For OpenBSD, Please install dependencies and cmake by running `pkg_add`:
323
+
324
+
```
325
+
pkg_add asio
326
+
pkg_add cmake
327
+
```
328
+
329
+
Currently, botan-3 has not been included in OpenBSD, so you must compile botan-3 yourself. It is recommended to place it in `/usr/local/include/` after compilation, with the full path being `/usr/local/include/botan-3/`, just like on FreeBSD.
330
+
331
+
Since the system's built-in Clang version is too low, you must install a newer version of Clang:
Please use `pkg_add` on OpenBSD to install the two dependencies mentioned above. On DragonflyBSD, please use `pkg`, the usage is the same as FreeBSD.
347
+
### DragonflyBSD
348
+
349
+
Like FreeBSD, use `pkg` to install dependencies and cmake:
350
+
351
+
```
352
+
pkg install asio cmake
353
+
```
251
354
252
-
Since botan-3 is not yet included in these BSD systems, it needs to be compiled manually.
355
+
Currently, botan-3 has not been included in DragonflyBSD, so you must compile botan-3 yourself. It is recommended to place it in `/usr/local/include/` after compilation, with the full path being `/usr/local/include/botan-3/`, just like on FreeBSD.
253
356
254
-
Please refer to the aforementioned FreeBSD for the remaining build steps.
357
+
Since the system's built-in GCC version is too low, you must install a newer version of GCC:
255
358
256
-
Note that due to the lower versions of the compilers included in these BSD systems, please install a higher version of GCC in advance.
The steps are similar to FreeBSD. Install asio and botan3 as well as cmake using the package manager provided by the distribution.
@@ -399,7 +512,7 @@ root soft nofile 300000
399
512
## About the Code
400
513
401
514
### Thread Pool
402
-
The thread pool used by UDPHop comes from [BS::thread_pool](https://github.com/bshoshany/thread-pool), with some modifications made for parallel encryption and decryption processing in multiple connections.
515
+
The thread pool used by UDPHop comes from [task-thread-pool](https://github.com/alugowski/task-thread-pool), uses for parallel encryption and decryption processing in multiple connections.
0 commit comments