Open jasonliul opened 3 years ago
You need to build aMule with libupnp
at least version 1.6.7.
This is a known problem for current release, compare #274.
But 1.6.7 should work. If not: more info is needed.
Ok, real good news.
Is it possible to build with UPnP support when crossing compiling? I compile aMule for windows on linux by
./configure --host=x86_64-w64-mingw32
and the configuration summary shows that UPnP is disabled because of cross compiling.
If the configure-script tells this, there must be a reason for this. As there was some work on libupnp, it be be possible that this works with cmake, but as testing this on win is around 1/3 done and cross-compiling with this was never tested, you can try but are on your own atm.
If the configure-script tells this, there must be a reason for this. As there was some work on libupnp, it be be possible that this works with cmake, but as testing this on win is around 1/3 done and cross-compiling with this was never tested, you can try but are on your own atm.
I am now able to cross compile for Windows with upnp using this patch: https://github.com/kiddin9/openwrt-amule-dlp/blob/main/amule-dlp/patches/002_enable_upnp_cross_compile.patch. However UPnP does not work and I have this error in aMule log
2022-01-10 15:28:42: Universal Plug and Play: UPnP Error: CUPnPControlPoint::AddPortMapping: WAN Service not detected.
The version of libupnp is 1.14.12. @jasonliul can you help test this build https://downloads.freehamster.org/amule.exe?
@minnyres That's a real gift, some guys complain this for a while, i'll ask them to test. Good job.
@jasonliul Does UPnP work for you?
@Vollstrecker I guess UPnP does not work for me because it does not bind the right network interface. As it shows below, there are many interfaces on my Windows computer. In the UPnP code, aMule starts it via
ret = UpnpInit2(0, udpPort);
where the first parameter should be the interface name (type: char *
). When set to 0
, UPnP binds the first interface, which is "Ethernet adapter vEthernet (Ethernet 2)" in my case. However, I actually connnect to internet through the interface "Wireless LAN adapter WLAN 4". To solve this problem, we might need a way to choose the right interface for UPnP.
Ethernet adapter vEthernet (Ethernet 2):
Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::e5a2:c030:488b:26ce%68 IPv4 Address. . . . . . . . . . . : 172.25.32.1 Subnet Mask . . . . . . . . . . . : 255.255.240.0 Default Gateway . . . . . . . . . :
Ethernet adapter Ethernet 2:
Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::a9ea:a62:efe8:42a0%14 Autoconfiguration IPv4 Address. . : 169.254.66.160 Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . :
Ethernet adapter ZeroTier One [8056c2e21ca2f6f1]:
Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::e469:bddd:c924:c5b6%19 IPv4 Address. . . . . . . . . . . : 192.168.191.140 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . :
Wireless LAN adapter WLAN 4:
Connection-specific DNS Suffix . : lan IPv6 Address. . . . . . . . . . . : fdcc:3a76:a2ef::fd0 IPv6 Address. . . . . . . . . . . : fdcc:3a76:a2ef:0:1cb1:12de:d456:e831 Temporary IPv6 Address. . . . . . : fdcc:3a76:a2ef:0:8c90:929c:848f:78c8 Link-local IPv6 Address . . . . . : fe80::1cb1:12de:d456:e831%24 IPv4 Address. . . . . . . . . . . : 192.168.1.136 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : fe80::4231:3cff:fedf:8f80%24 192.168.1.1
That's right, a mechanism to select the right device would be usefull. As a workaround you could deactivate the wrong device. After the upnp-stuff is done it could be reactivated without disturbing the other.
@minnyres Sorry, im stucked by covid-19, stay outside of home. i've ask some guy to test, but unluck, seems nobody have time.
@minnyres Thank to deniums, it works fine on XP, will test on other OS late.
As a workaround you could deactivate the wrong device. After the upnp-stuff is done it could be reactivated without disturbing the other.
This workaround works for me on Windows 10.
@jasonliul Thanks. I also have tested on Windows 10. A new release is built with upup and boost: https://github.com/minnyres/amule-win32/releases/latest
@minnyres It's been long time, nice shot!
Just for instance I have a build from Visual Studio: https://github.com/amule-project/amule/discussions/317
@Vollstrecker I guess UPnP does not work for me because it does not bind the right network interface. As it shows below, there are many interfaces on my Windows computer. In the UPnP code, aMule starts it via
ret = UpnpInit2(0, udpPort);
Someone could add a "preference" for the interface and pass it as the first parameter.
There is such a setting, but can not enable it.
also, campare with eMule, luck of some feature close button also can minimizes the window to the tray file extension columns in the search results