Skip to content

Commit 5b19d23

Browse files
committed
Add udp-redirect(1) man page and minor README.md tweaks
1 parent 2ed399b commit 5b19d23

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# udp-redirect
22
A simple yet flexible and very fast UDP redirector. Tested on Linux x64 and MacOS / Darwin arm64.
33

4-
Useful for redirecting UDP traffic (e.g., Wireguard VPN, DNS, etc.) where doing it at a different layer (e.g., from a firewall) is challenging / impossible. Does not modify the redirected packets.
4+
Useful for redirecting UDP traffic (e.g., Wireguard VPN, DNS, etc.) when doing it at a different layer (e.g., from a firewall) is difficult. Does not modify the redirected packets.
55

66
Single file source code for convenience.
77

@@ -77,48 +77,48 @@ Runs in foreground and expects external process control (svscan, nohup, etc.)
7777
| --- | --- | --- | --- |
7878
| ```--verbose``` | | *optional* | Verbose mode, can be specified multiple times. |
7979
| ```--debug``` | | *optional* | Debug mode (e.g., very verbose). |
80-
| ```--stats``` | | *optional* | Display send/receive and resource consumption every 60 seconds. |
80+
| ```--stats``` | | *optional* | Display sent/received bytes statistics every 60 seconds. |
8181

8282
## Listener
8383

84-
The UDP sender (e.g., wireguard client) sends packets to the UDP redirector here.
84+
The UDP sender (e.g., wireguard client) sends packets to the UDP redirector specified below.
8585

8686
| Argument | Parameters | Req/Opt | Description |
8787
| --- | --- | --- | --- |
88-
| ```--listen-address``` | address | *optional* | Listen address. |
88+
| ```--listen-address``` | ipv4 address | *optional* | Listen address, defaults to INADDR_ANY. |
8989
| ```--listen-port``` | port | **required** | Listen port. |
9090
| ```--listen-interface``` | interface | *optional* | Listen interface name. |
9191
| ```--listen-address-strict``` | | *optional* | **Security:** By default, packets received from the connect endpoint will be sent to the source of the last packet received on the listener endpoint. In ```listen-address-strict``` mode, only accept packets from the same source as the first packet, or the source specified by ```listen-sender-address``` and ```listen-sender-port```. |
9292

9393
## Connect
9494

95-
The UDP redirector sends packets here (e.g., to the wireguard server):
95+
The UDP redirector sends packets to the endpoint specified below.
9696

9797
| Argument | Parameters | Req/Opt | Description |
9898
| --- | --- | --- | --- |
99-
| ```--connect-address``` | address | **required** | Connect address. |
100-
| ```--connect-host``` | address | **required** | Connect host, overwrites ```connect-host``` if both are specified. |
99+
| ```--connect-address``` | ipv4 address | **required** | Connect address. |
100+
| ```--connect-host``` | hostname | **required** | Connect host, overwrites ```connect-address``` if both are specified. |
101101
| ```--connect-port``` | port | **required** | Connect port. |
102-
| ```--connect-address-strict``` | | *optional* | **Security**: Only accept packets from ```connect-host``` / ```connect-port```, otherwise accept from all sources. |
102+
| ```--connect-address-strict``` | | *optional* | **Security**: Only accept packets from ```connect-host``` and ```connect-port```, otherwise accept from all sources. |
103103

104104
# Sender
105105

106-
The UDP redirector sends packets from here (e.g., to the wireguard server). If any is missing, it will be selected by the operating system (usually ```0.0.0.0```, random port, default interface).
106+
The UDP redirector sends packets from the local endpoint specified below. If any arguments are missing, it will be selected by the operating system (usually INADDR_ANY, random port, default interface).
107107

108108
| Argument | Parameters | Req/Opt | Description |
109109
| --- | --- | --- | --- |
110-
| ```--send-address``` | address | *optional* | Send packets from address. |
111-
| ```--send-port``` | port | *optional* | Send packets from port. |
112-
| ```--send-interface``` | interface | *optional* | Send packets from interface. |
110+
| ```--send-address``` | ipv4 address | *optional* | Send packets from this address. |
111+
| ```--send-port``` | port | *optional* | Send packets from this port. |
112+
| ```--send-interface``` | interface | *optional* | Send packets from this interface name. |
113113

114114
# Listener security
115115

116116
Both must be specified; listener drops packets if they do not arrive from this address / port.
117117

118118
| Argument | Parameters | Req/Opt | Description |
119119
| --- | --- | --- | --- |
120-
| ```--listen-sender-address``` | address | *optional* | Listen endpoint only accepts packets from this source address. |
121-
| ```--listen-sender-port``` | port | *optional* | Listen endpoint only accepts packets from this source port (must be set together, ```--listen-strict``` is implied). |
120+
| ```--listen-sender-address``` | ipv4 address | *optional* | Listen endpoint only accepts packets from this source address. |
121+
| ```--listen-sender-port``` | port | *optional* | Listen endpoint only accepts packets from this source port (must be set together, ```--listen-address-strict``` is implied). |
122122

123123
# Miscellaneous
124124

udp-redirect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ int main(int argc, char *argv[]) {
369369

370370
if ((s.lsaddr != NULL && s.lsport == 0) ||
371371
(s.lsaddr == NULL && s.lsport != 0)) {
372-
usage(argv0, "Options lsport and csport must either both be specified or none");
372+
usage(argv0, "Options --listen-sender-port and --list-sender-address must either both be specified or none");
373373
}
374374

375375
/* Set strict mode if using lsport and csport */

0 commit comments

Comments
 (0)