wangyu- / tinyfecVPN

A VPN Designed for Lossy Links, with Build-in Forward Error Correction(FEC) Support. Improves your Network Quality on a High-latency Lossy Link.
MIT License
2.28k stars 457 forks source link

为何连接后会有这么多的 Drop ? #55

Closed bao3 closed 6 years ago

bao3 commented 6 years ago

For English speaking user: https://github.com/wangyu-/UDPspeeder/wiki/Issue-Guide

中文用户请看: https://github.com/wangyu-/UDPspeeder/wiki/发Issue前请看 (否则Issue可能被忽略,或被直接关掉)

[2018-07-15 02:55:19][WARN][restriction]packet's dest ip [199.91.73.222] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:19][WARN][restriction]packet's dest ip [8.8.8.8] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:21][WARN][restriction]packet's dest ip [199.91.73.222] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:21][WARN][restriction]packet's dest ip [8.8.8.8] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:21][WARN][restriction]packet's dest ip [199.91.73.222] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:21][WARN][restriction]packet's dest ip [8.8.8.8] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:21][WARN][restriction]packet's dest ip [199.91.73.222] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:21][WARN][restriction]packet's dest ip [8.8.8.8] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:23][WARN][restriction]packet's dest ip [115.239.211.112] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:24][WARN][restriction]packet's dest ip [115.239.211.112] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:25][WARN][restriction]packet's dest ip [115.239.210.27] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:26][WARN][restriction]packet's dest ip [115.239.210.27] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:28][WARN][restriction]packet's dest ip [115.239.211.112] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:29][WARN][restriction]packet's dest ip [115.239.211.112] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:29][WARN][restriction]packet's dest ip [199.91.73.222] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:29][WARN][restriction]packet's dest ip [8.8.8.8] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:29][WARN][restriction]packet's dest ip [199.91.73.222] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:29][WARN][restriction]packet's dest ip [8.8.8.8] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:30][WARN][restriction]packet's dest ip [115.239.210.27] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:31][WARN][restriction]packet's dest ip [115.239.210.27] not in subnet [10.22.22.0],dropped
[2018-07-15 02:55:32][WARN][restriction]packet's dest ip [199.91.73.222] not in subnet [10.22.22.0],dropped
phc217 commented 6 years ago

访问服务器以外的地址需要自行编译无限制版服务端。

bao3 commented 6 years ago

@phc217 感谢指点。我在原代码里看到如下片断:

#ifndef NOLIMIT
 -      if(client_or_server==server_mode)
 -      {
 -          char * tmp_data=out_arr[i];
 -          int tmp_len=out_len[i];
 -          if(tmp_len>=20)
 -          {
 -              u32_t dest_ip=htonl(read_u32(tmp_data+16));
 -              //printf("%s\n",my_ntoa(dest_ip));
 -              if(  ( ntohl(sub_net_uint32)&0xFFFFFF00 ) !=  ( ntohl (dest_ip) &0xFFFFFF00) )
 -              {
 -                  string sub=my_ntoa(dest_ip);
 -                  string dst=my_ntoa( htonl( ntohl (sub_net_uint32) &0xFFFFFF00)   );
 -                  mylog(log_warn,"[restriction]packet's dest ip [%s] not in subnet [%s],dropped\n", sub.c_str(), dst.c_str());
 -                  continue;
 -              }
 -          }
 -      }
 -#endif

是不是意味着我只要在这个文件的开头就写上 #define NOLIMIT ?就可以了?

bao3 commented 6 years ago

@phc217 Hi,上面的问题不用回答了,因为我在 makefile 里找到答案了。

# targets without restrictions:
nolimit:
    make OPT=-DNOLIMIT
nolimit_all:
    make OPT=-DNOLIMIT
nolimit_cross:
    make cross OPT=-DNOLIMIT
nolimit_cross2:
    make cross2 OPT=-DNOLIMIT
nolimit_cross3:
    make cross3 OPT=-DNOLIMIT
nolimit_release:
    make release OPT=-DNOLIMIT
kevincai100 commented 5 years ago

@bao3 请问怎么编译无限制的版本?