liudf0716 / xkcptun

xkcptun is kcp tunnel for OpenWRT&LEDE, implemented in c language
GNU General Public License v3.0
463 stars 118 forks source link

通过cygwin编译出来的xkcp_client,localinterface参数应该怎样填? #27

Open ekenchan opened 7 years ago

joyhope commented 6 years ago

cygwin does not support get_iface_ip, so the meaning should be changed ip string.

find following code, and made a little change.

char *addr = get_iface_ip(xkcp_get_param()->local_interface);
if (!addr) {
    debug(LOG_ERR, "get_iface_ip [%s] failed", xkcp_get_param()->local_interface);
    addr = xkcp_get_param()->local_interface;  <<=add
    //exit(0);  <<==remove
}

the localinterface could be set up as a local ip address.

This changed make the project work in cygwin.

But my browser test is not working. I guess concurrent connection cause the problems.

l1viathan commented 6 years ago

Please consider change "localinterface" to "localaddress" in the code.

For example, I have two interfaces, eth0 and wlan0, either one can be used. While I only want 127.0.0.1 used, but specifying lo won't work.

liudf0716 commented 6 years ago

@jikesong r u old friend from linuxforum?

l1viathan commented 6 years ago

Yeah, glad to meet you here :)