Port over TCP relay functionality from ZeroTier One

This commit is contained in:
Joseph Henry
2023-07-24 18:56:40 -07:00
parent ca83e941a4
commit 5874e442eb
4 changed files with 404 additions and 33 deletions

View File

@@ -1274,6 +1274,24 @@ int zts_init_set_event_handler(jobject obj_ref, jmethodID id);
ZTS_API int ZTCALL zts_init_set_event_handler(void (*callback)(void*));
#endif
/**
* @brief Set TCP relay for ZeroTier to use instead of P2P UDP
*
* @param tcp_relay_addr IP address of TCP relay
* @param tcp_relay_port Port of TCP relay
*/
ZTS_API int ZTCALL zts_init_set_tcp_relay(const char* tcp_relay_addr, unsigned short tcp_relay_port);
/**
* @brief Allow TCP relay for ZeroTier to use instead of P2P UDP
*/
ZTS_API int ZTCALL zts_init_allow_tcp_relay(int enabled);
/**
* @brief Force TCP relay for ZeroTier to use instead of P2P UDP
*/
ZTS_API int ZTCALL zts_init_force_tcp_relay(int enabled);
/**
* @brief Blacklist an interface prefix (or name). This prevents ZeroTier from
* sending traffic over matching interfaces. This is an initialization function that can