proxy: rename + simplify + backpressure
- tcp_proxy/remote_proxy → tcp_proxy_client/tcp_proxy_server - Все proxy файлы перенесены в src/proxy/ - Конфиг: [tcp_proxy]→[tcp_proxy_client], [remote_proxy]→[tcp_proxy_server] - Убран subcmd CONNECTED (0x02) — клиент шлёт DATA сразу после CONNECT - Backpressure: etcp_router_waiter_register/cancel через ll_queue threshold waiter - Клиент: recv_cb send fail → tx_buf+waiter, не tcp_recved() (окно lwIP=0) - Сервер: read_cb send fail → pause_buf+waiter, пауза read_id - CLOSE/ERROR отправляется только после drain всех очередей - Fail: conn не найден/closed → send ERROR вместо CLOSE/silent drop - PROTOCOL.md: полная архитектура с диаграммами состояний и потоков
This commit is contained in:
1 parent
e7a9163011
commit
1f4fe37fe5
41 files changed
+1659
-659
No files matched your search
+12
-12
@@ -82,8 +82,8 @@ struct CFG_ALLOWED_KEY {
|
||||
struct CFG_ALLOWED_KEY *next;
|
||||
};
|
||||
|
||||
#define MAX_TCP_PROXY_MAPPINGS 32
|
||||
struct tcp_proxy_mapping_config {
|
||||
#define MAX_TCP_PROXY_CLIENT_MAPPINGS 32
|
||||
struct tcp_proxy_client_mapping_config {
|
||||
uint16_t local_port;
|
||||
char remote_ip[64];
|
||||
uint16_t remote_port;
|
||||
@@ -150,17 +150,17 @@ struct global_config {
|
||||
} nat_forwards[MAX_NAT_FORWARDS];
|
||||
int nat_forward_count;
|
||||
|
||||
// TCP proxy configuration ([tcp_proxy] section)
|
||||
int tcp_proxy_enabled;
|
||||
char tcp_proxy_tun_name[16];
|
||||
char tcp_proxy_tun_ip[64];
|
||||
int tcp_proxy_mtu;
|
||||
uint64_t tcp_proxy_via_node_id; // через этот узел проксируются все forward-правила
|
||||
struct tcp_proxy_mapping_config tcp_proxy_mappings[MAX_TCP_PROXY_MAPPINGS];
|
||||
int tcp_proxy_mapping_count;
|
||||
// TCP proxy client configuration ([tcp_proxy_client] section)
|
||||
int tcp_proxy_client_enabled;
|
||||
char tcp_proxy_client_tun_name[16];
|
||||
char tcp_proxy_client_tun_ip[64];
|
||||
int tcp_proxy_client_mtu;
|
||||
uint64_t tcp_proxy_client_via_node_id; // через этот узел проксируются все forward-правила
|
||||
struct tcp_proxy_client_mapping_config tcp_proxy_client_mappings[MAX_TCP_PROXY_CLIENT_MAPPINGS];
|
||||
int tcp_proxy_client_mapping_count;
|
||||
|
||||
// Remote proxy (exit node) configuration ([remote_proxy] section)
|
||||
int remote_proxy_enabled;
|
||||
// TCP proxy server (exit node) configuration ([tcp_proxy_server] section)
|
||||
int tcp_proxy_server_enabled;
|
||||
};
|
||||
|
||||
struct utun_config {
|
||||
|
||||
Reference in new issue
Block a user