Decrypted Traffic Steering 回流回注测试通过
This commit is contained in:
@@ -85,6 +85,8 @@ struct tfe_stream_private
|
||||
struct tfe_stream_write_ctx * w_ctx_downstream;
|
||||
struct tfe_conn_private * conn_upstream;
|
||||
struct tfe_conn_private * conn_downstream;
|
||||
struct tfe_conn_private * conn_fake_c;
|
||||
struct tfe_conn_private * conn_fake_s;
|
||||
|
||||
struct
|
||||
{
|
||||
@@ -130,6 +132,9 @@ struct tfe_stream_private
|
||||
/* KEYRING-ID */
|
||||
unsigned keyring_id;
|
||||
|
||||
evutil_socket_t fd_fake_c;
|
||||
evutil_socket_t fd_fake_s;
|
||||
|
||||
/* ONLY FOR LOG */
|
||||
evutil_socket_t log_fd_downstream;
|
||||
evutil_socket_t log_fd_upstream;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <event2/event.h>
|
||||
#include <sender_scm.h>
|
||||
#include <ssl_stream_core.h>
|
||||
#include <net/if.h>
|
||||
|
||||
struct ssl_mgr;
|
||||
struct key_keeper;
|
||||
@@ -60,6 +61,15 @@ struct tfe_proxy_tcp_options
|
||||
int tcp_ttl_downstream;
|
||||
};
|
||||
|
||||
struct tfe_traffic_steering_options
|
||||
{
|
||||
int enable;
|
||||
int so_mask_client;
|
||||
int so_mask_server;
|
||||
char device_client[IFNAMSIZ];
|
||||
char device_server[IFNAMSIZ];
|
||||
};
|
||||
|
||||
struct tfe_proxy_rate_limit_options
|
||||
{
|
||||
unsigned int read_rate;
|
||||
@@ -141,6 +151,8 @@ struct tfe_proxy
|
||||
|
||||
/* load balancing */
|
||||
enum tfe_load_balance_algo load_balance;
|
||||
|
||||
struct tfe_traffic_steering_options traffic_steering_options;
|
||||
};
|
||||
|
||||
extern struct tfe_proxy * g_default_proxy;
|
||||
@@ -152,6 +164,6 @@ struct tfe_thread_ctx * tfe_proxy_thread_ctx_acquire(struct tfe_proxy * ctx);
|
||||
void tfe_proxy_thread_ctx_release(struct tfe_thread_ctx * thread_ctx);
|
||||
|
||||
struct tfe_proxy * tfe_proxy_new(const char * profile);
|
||||
int tfe_proxy_fds_accept(struct tfe_proxy * ctx, int fd_downstream, int fd_upstream, struct tfe_cmsg * cmsg);
|
||||
int tfe_proxy_fds_accept(struct tfe_proxy * ctx, int fd_downstream, int fd_upstream, int fd_fake_c, int fd_fake_s, struct tfe_cmsg * cmsg);
|
||||
void tfe_proxy_run(struct tfe_proxy * proxy);
|
||||
int tfe_thread_set_affinity(int core_id);
|
||||
|
||||
@@ -12,5 +12,5 @@ enum tfe_stream_option
|
||||
};
|
||||
|
||||
int tfe_stream_option_set(struct tfe_stream * stream, enum tfe_stream_option opt, const void * arg, size_t sz_arg);
|
||||
int tfe_stream_init_by_fds(struct tfe_stream * stream, evutil_socket_t fd_downstream, evutil_socket_t fd_upstream);
|
||||
int tfe_stream_init_by_fds(struct tfe_stream *stream, evutil_socket_t fd_downstream, evutil_socket_t fd_upstream, evutil_socket_t fd_fake_c, evutil_socket_t fd_fake_s);
|
||||
void tfe_stream_destory(struct tfe_stream_private * stream);
|
||||
|
||||
Reference in New Issue
Block a user