- Add utun VPN daemon with config parsing, control socket, routing, and TUN interface - Refactor net_emulator/u_async to support multiple independent instances - Replace linked-list timeout management with heap-based implementation - Fix timeout processing bug (process timeouts after select) - Add comprehensive random timeout and instance isolation tests - Update Makefile to build utun and new test targets
31 lines
1.4 KiB
Plaintext
31 lines
1.4 KiB
Plaintext
# utun configuration file example
|
|
# Global settings
|
|
[global]
|
|
# Generate keys using: openssl ecparam -name prime256v1 -genkey -noout | openssl ec -text -noout
|
|
# Private key (32 bytes in hex)
|
|
my_private_key=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
|
# Public key (64 bytes in hex)
|
|
my_public_key=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
|
# Global option (optional)
|
|
option=value
|
|
|
|
# Server connection (listening for incoming connections)
|
|
[connection: server1]
|
|
mode=server
|
|
addr=0.0.0.0:51820 # Listen on all interfaces, port 51820
|
|
peer_public_key=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
|
so_mark=0 # Socket mark (0 = disabled)
|
|
netif=eth0 # Bind to specific network interface
|
|
tun=tun0 # TUN interface name
|
|
tun_ip=10.0.0.1/24 # TUN interface IP address
|
|
|
|
# Client connection (initiate connection to server)
|
|
[connection: client1]
|
|
mode=client
|
|
from_addr=0.0.0.0:51821 # Local address to bind (0.0.0.0 = any)
|
|
to_addr=192.168.1.100:51820 # Remote server address
|
|
peer_public_key=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
|
so_mark=0
|
|
netif=eth0
|
|
tun=tun1
|
|
tun_ip=10.0.0.2/24 |