ss-server: allows you to set a TOS/DSCP value to the outgoing ciphered connection to the client from a netfilter mark setted on the (re)comming connection from the outside world.

This commit is contained in:
Sebastien DUPONCHEEL
2017-03-08 13:58:28 +08:00
committed by Max Lv
parent f32ac38c2f
commit 6c6a054e5f
2 changed files with 130 additions and 0 deletions
+17
View File
@@ -53,6 +53,20 @@ typedef struct server_ctx {
struct server *server;
} server_ctx_t;
#ifdef USE_NFCONNTRACK_TOS
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
#include <libnetfilter_conntrack/libnetfilter_conntrack_tcp.h>
struct dscptracker {
struct nf_conntrack *ct;
long unsigned int mark;
unsigned int dscp;
unsigned int packet_count;
};
#endif
typedef struct server {
int fd;
int stage;
@@ -70,6 +84,9 @@ typedef struct server {
struct ResolvQuery *query;
struct cork_dllist_item entries;
#ifdef USE_NFCONNTRACK_TOS
struct dscptracker* tracker;
#endif
} server_t;
typedef struct query {