mirror of
https://github.com/yrutschle/sslh.git
synced 2026-10-22 18:12:10 +03:00
removed static known_source arrays, UDP connections are now managed dynamically
This commit is contained in:
1 parent
8af87ebbad
commit
e7df8eeaa1
4 files changed
+51
-85
No files matched your search
@@ -95,15 +95,13 @@ struct queue {
|
||||
int deferred_data_size;
|
||||
};
|
||||
|
||||
struct known_udp_source;
|
||||
|
||||
struct connection {
|
||||
int type; /* SOCK_DGRAM | SOCK_STREAM */
|
||||
struct sslhcfg_protocols_item* proto; /* Where to connect to */
|
||||
|
||||
/* SOCK_STREAM */
|
||||
enum connection_state state;
|
||||
time_t probe_timeout;
|
||||
struct sslhcfg_protocols_item* proto;
|
||||
|
||||
/* q[0]: queue for external connection (client);
|
||||
* q[1]: queue for internal connection (httpd or sshd);
|
||||
@@ -111,7 +109,16 @@ struct connection {
|
||||
struct queue q[2];
|
||||
|
||||
/* SOCK_DGRAM */
|
||||
struct known_udp_source* udp_source;
|
||||
struct sockaddr client_addr; /* Contains the remote client address */
|
||||
socklen_t addrlen;
|
||||
|
||||
int local_endpoint; /* Contains the local address */
|
||||
|
||||
time_t last_active;
|
||||
|
||||
/* We need one local socket for each target server, so we know where to
|
||||
* forward server responses */
|
||||
int target_sock;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user