Skip to content

simple cross-platform socks5 proxy server, supprotive TCP and UDP commands

License

Notifications You must be signed in to change notification settings

atomlin-git/eproxy-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple cross-platform socks5 proxy server, which supports TCP and UDP commands, and can work how library
callbacks use example:
// announce callbacks:
callback<udp_callback_t> udp_callback;

// install detour functions:
udp_callback.install([&](client* person, unsigned int& source_ip, unsigned int& dest_ip, unsigned short& source_port, unsigned short& dest_port, proxys::data* buf) -> bool {
    printf("[%s -> %s | %d -> %d] length: %d\n\n", utils::dip_to_strip(source_ip).c_str(), utils::dip_to_strip(dest_ip).c_str(), source_port, dest_port, buf->length);
    return true;
});

// enable callbacks treatment:
server.callback_enable(proxys::callback_udp, &udp_callback);
due to the peculiarities of the TCP/IP protocol, the dest IP and port cannot be changed on the go, because of this, the TCP callback has a different structure: (client* person, std::string source_ip, std::string dest_ip, proxys::data* buf)
one-header solution available in "one-header" branch

known issues:

small memory leak when the connection to the proxied object does not break


todo list:

bind command support
support ipv6
backward compatibility with socsk4
add more comments (or write small doc) to internal functional

About

simple cross-platform socks5 proxy server, supprotive TCP and UDP commands

Resources

License

Stars

Watchers

Forks