Skip to content

ENet reliable UDP networking library with SOCKS5 protocol support and others

License

Notifications You must be signed in to change notification settings

koftrciali/enet-socks5

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note

This is a fork and a modified version of enet. Because the original enet library doesn't support SOCKS5 protocol, we decided to add a support of it. Not only SOCKS5, we also add a support for Growtopia's Ubisoft Protocol, for both client/server.

Changes

  • SOCKS5 Implementation
  • Growtopia's Ubisoft Protocol that is compatible to SOCKS5 protocol aswell

Usage

To enable SOCKS5 protocol, you will need to write some code just below enet_host_create

ENetSocks5Config config;
config.address.port = 1080; // The SOCKS5 proxy port

const char *proxy_host_ip = "127.0.0.1"; // The SOCKS5 proxy address
if (enet_address_set_host_ip(&config.address, proxy_host_ip)) {
  fprintf(stderr, "Can't bind address to %s\n", proxy_host_ip);
  return EXIT_FAILURE;
}

strcpy(config.username, "proxy-username-here"); // Your SOCKS5 username, or leave blank for no authentication method
strcpy(config.password, "proxy-password-here"); // Your SOCKS5 password, or leave blank for no authentication method

if (enet_host_use_socks5(host, &config)) {
  fprintf(stderr, "Can't bind host to socks5\n");
  return EXIT_FAILURE;
}

Enabling Growtopia's Ubisoft Protocol support is as simple as:

enet_host_set_using_new_packet(host, 1);

For the full code, check: test.c

Credits

All credits and rights belongs to the author of enet library Lee Salzman

Other notable people:

About

ENet reliable UDP networking library with SOCKS5 protocol support and others

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 97.8%
  • CMake 1.1%
  • Other 1.1%