mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-30 13:13:44 +00:00
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:
committed by
Max Lv
parent
f32ac38c2f
commit
6c6a054e5f
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user