Files
utun2/utun_test.conf
T
Evgeny 6ef89f6773 Refactor: Move mainloop from utun_instance to main
Major architectural changes:
- utun_instance_run() now does single iteration instead of mainloop
- Added tun_read_callback() to handle TUN device packets
- Added utun_instance_register_sockets() for uasync integration
- Mainloop moved to main() with proper signal handling
- Removed parse config file functions from debug_config
- all fprintf replaced with DEBUG_* macros

Files changed:
- src/utun.c: Added mainloop, signal handlers, proper init order
- src/utun_instance.c: Added callback, socket registration, single-run
- src/utun_instance.h: Added declarations, tun_socket_id field
- u_async/debug_config.c: Removed file parsing and auto-reload
- u_async/debug_config.h: Removed file functions, added categories
- changelog.txt: Added all changes

Breaking changes:
- debug_parse_config_file() removed (use debug_parse_config() only)
- etcp crypto integration needs fixing (separate issue)

AGENTS.md principles followed:
- No backward compatibility preserved
- Removed 103+ lines of legacy code
- Added statistics tracking
- Clean architecture: create -> init -> register -> run -> destroy
2026-01-18 14:28:57 +03:00

43 lines
1.1 KiB
Plaintext
Executable File

[global]
my_private_key=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
my_public_key=abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789
my_node_id=babababa1123 # 64bit ID
option=value1,value2
tun_ip=10.0.0.1/24
mtu=1500 # MTU for all connections (0 = use default 1500)
control_ip=127.0.0.1
control_port=12345
net_debug=0
[routing]
allowed_subnet=10.0.0.0/24
allowed_subnet=10.22.0.0/16
allowed_subnet=10.23.0.0/16
my_subnet=10.23.5.0/24
my_subnet=10.23.6.0/24
# мои адреса и каналы
[server: wired1_fast]
addr=192.168.0.10:1234
so_mark=100
netif=eth0
type=nat # public / nat / private
[server: wireless_bkp]
addr=192.168.0.10:1234
so_mark=100
netif=eth0
type=public # public / nat / private
[client: client_test1]
# линки
link=wired1_fast:192.168.0.20:1234
link=wired1_fast:1.2.3.4:1234
link=wireless_bkp:192.168.0.20:1234
link=wireless_bkp:1.2.3.4:1234
#keepalive после ресета etcp передаём серверу
keepalive=1
peer_public_key=deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef