Skip to content

Commit

Permalink
Decouple proxy impl. for UDP from redudp like redsocks
Browse files Browse the repository at this point in the history
  • Loading branch information
semigodking committed Apr 1, 2015
1 parent df555c9 commit c3e3d60
Show file tree
Hide file tree
Showing 7 changed files with 899 additions and 747 deletions.
4 changes: 3 additions & 1 deletion Makefile
@@ -1,4 +1,6 @@
OBJS := parser.o main.o redsocks.o log.o direct.o ipcache.o autoproxy.o encrypt.o shadowsocks.o http-connect.o socks4.o socks5.o http-relay.o base.o base64.o md5.o http-auth.o utils.o redudp.o tcpdns.o gen/version.o
OBJS := parser.o main.o redsocks.o log.o direct.o ipcache.o autoproxy.o encrypt.o shadowsocks.o http-connect.o \
socks4.o socks5.o http-relay.o base.o base64.o md5.o http-auth.o utils.o redudp.o socks5-udp.o \
tcpdns.o gen/version.o
SRCS := $(OBJS:.o=.c)
CONF := config.h
DEPS := .depend
Expand Down
8 changes: 7 additions & 1 deletion redsocks.conf.example
Expand Up @@ -101,6 +101,9 @@ redudp {
login = username;
password = pazzw0rd;

// know types: socks5
type = socks5;

// kernel does not give us this information, so we have to duplicate it
// in both iptables rules and configuration file. By the way, you can
// set `local_ip' to 127.45.67.89 if you need more than 65535 ports to
Expand All @@ -109,8 +112,11 @@ redudp {
dest_ip = 8.8.8.8;
dest_port = 53;

// Do not set it large if this section is for DNS requests. Otherwise,
// you may encounter out of file descriptor problem. For DNS requests,
// 10s is adequate.
udp_timeout = 30;
udp_timeout_stream = 180;
// udp_timeout_stream = 180;
}

tcpdns {
Expand Down

0 comments on commit c3e3d60

Please sign in to comment.