mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-09-17 12:44:27 +08:00
Compare commits
6 Commits
20180830.1
...
20181113.0
Author | SHA1 | Date | |
---|---|---|---|
|
0137dba1fd | ||
|
b6f76827b0 | ||
|
66eb002528 | ||
|
b1f0498472 | ||
|
e5584c73be | ||
|
c855a14ae8 |
@@ -29,9 +29,9 @@ ICMP/FakeTCP headers help you bypass UDP blocking, UDP QOS or improper UDP NAT b
|
||||
UDP headers are also supported. In UDP header mode, it behaves just like a normal UDP tunnel, and you can just make use of the other features (such as encrytion, anti-replay, or connection stalization).
|
||||
|
||||
### Simulated TCP with Real-time/Out-of-Order Delivery
|
||||
In FakeTCP header mode,udp2raw simulates 3-way handshake while establishing a connection,simulates seq and ack_seq while data transferring. It also simulates following TCP options: `MSS`, `sackOk`, `TS`, `TS_ack`, `wscale`.Firewalls will regard FakeTCP as a TCP connection, but its essentially UDP: it supports real-time/out-of-order delivery(just as normal UDP does), no congrestion control or re-transmission. So there wont be any TCP over TCP problem when using OpenVPN.
|
||||
In FakeTCP header mode,udp2raw simulates 3-way handshake while establishing a connection,simulates seq and ack_seq while data transferring. It also simulates following TCP options: `MSS`, `sackOk`, `TS`, `TS_ack`, `wscale`.Firewalls will regard FakeTCP as a TCP connection, but its essentially UDP: it supports real-time/out-of-order delivery(just as normal UDP does), no congestion control or re-transmission. So there wont be any TCP over TCP problem when using OpenVPN.
|
||||
|
||||
### Encrpytion, Anti-Replay
|
||||
### Encryption, Anti-Replay
|
||||
* Encrypt your traffic with AES-128-CBC.
|
||||
* Protect data integrity by HMAC-SHA1 (or weaker MD5/CRC32).
|
||||
* Defense replay attack with an anti-replay window, smiliar to IPSec and OpenVPN.
|
||||
|
@@ -513,7 +513,8 @@ int client_on_udp_recv(conn_info_t &conn_info)
|
||||
socklen_t udp_new_addr_len = sizeof(address_t::storage_t);
|
||||
if ((recv_len = recvfrom(udp_fd, buf, max_data_len+1, 0,
|
||||
(struct sockaddr *) &udp_new_addr_in, &udp_new_addr_len)) == -1) {
|
||||
mylog(log_warn,"recv_from error,%s\n",get_sock_error());
|
||||
mylog(log_debug,"recv_from error,%s\n",get_sock_error());
|
||||
return -1;
|
||||
//myexit(1);
|
||||
};
|
||||
|
||||
|
@@ -2543,9 +2543,9 @@ int client_bind_to_a_new_port(int &fd,u32_t local_ip_uint32)//find a free port a
|
||||
int client_bind_to_a_new_port2(int &fd,const address_t& address)//find a free port and bind to it.
|
||||
{
|
||||
address_t tmp=address;
|
||||
int raw_send_port=10000+get_true_random_number()%(65535-10000);
|
||||
for(int i=0;i<1000;i++)//try 1000 times at max,this should be enough
|
||||
{
|
||||
int raw_send_port=10000+get_true_random_number()%(65535-10000);
|
||||
tmp.set_port(raw_send_port);
|
||||
if (try_to_list_and_bind2(fd,tmp)==0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user