ntptun/examples/server_udp.conf
2026-07-24 17:15:46 +02:00

35 lines
1.3 KiB
Text

# Example ntptun SERVER configuration — UDP port-tunneling transport.
#
# In this mode the server does NOT use a TUN interface. It forwards each
# client's decapsulated UDP payloads to a single real target, using a distinct
# source port per client so multiple users are demultiplexed by their outgoing
# port: source_port = udp_base_port + client_id.
#
# Example: udp_base_port = 40000 means client_id 42 sends to the target from
# source port 40042. Ensure udp_base_port + max(client_id) stays <= 65535.
mode = server
transport = udp
listen = 0.0.0.0:12300
# The real destination that every client's payloads are relayed to (e.g. a
# WireGuard server endpoint).
udp_target = 198.51.100.7:51820
udp_base_port = 40000
# Optional: relay ordinary (non-tunnel) NTP requests to a real upstream server.
upstream = 192.168.1.1:123
ext_type = 0x0F4E
# Largest UDP payload (each direction) that fits one NTP carrier. Larger
# datagrams are discarded with an error in the log.
inner_mtu = 1136
ntp_payload_cap = 1200
relay_timeout_ms = 1000
relay_rate_per_sec = 10
log_level = info
# push = false
default_key = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
client_key = 42:202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f