Giter Site home page Giter Site logo

Comments (11)

kiplingw avatar kiplingw commented on June 5, 2024 2

Thanks @slook. This is what I'm seeing:

2024-03-22 09:58:42 [Misc] Creating Port Mapping rule...
2024-03-22 09:58:42 [Misc] NAT-PMP: Portmap request attempt 1 of 2: b'\x00\x02\x00\x00\x08\xba\x08\xba\x00\x00\xa8\xc0'
2024-03-22 09:58:42 [Misc] NAT-PMP: Portmap request attempt 2 of 2: b'\x00\x02\x00\x00\x08\xba\x08\xba\x00\x00\xa8\xc0'
2024-03-22 09:58:42 [Misc] NAT-PMP: Giving up, all 2 portmap requests timed out
2024-03-22 09:58:42 [Misc] NAT-PMP not available, falling back to UPnP: NAT-PMP error code None
2024-03-22 09:58:42 [Misc] UPnP: Discovering... delay=1 seconds
2024-03-22 09:58:42 [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:service:WANIPConnection:1\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
2024-03-22 09:58:42 [Misc] UPnP: Sent M-SEARCH IP request 1
2024-03-22 09:58:42 [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:service:WANPPPConnection:1\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
2024-03-22 09:58:42 [Misc] UPnP: Sent M-SEARCH PPP request 1
2024-03-22 09:58:42 [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
2024-03-22 09:58:42 [Misc] UPnP: Sent M-SEARCH IGD request 1
2024-03-22 09:58:42 [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:service:WANIPConnection:2\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
2024-03-22 09:58:42 [Misc] UPnP: Sent M-SEARCH IP request 2
2024-03-22 09:58:42 [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:device:InternetGatewayDevice:2\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
2024-03-22 09:58:42 [Misc] UPnP: Sent M-SEARCH IGD request 2
2024-03-22 09:58:42 [Misc] UPnP: Device search response: b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=3600\r\nEXT: \r\nLOCATION: http://192.168.88.1:2828/gateway_description.xml\r\nSERVER: RouterOS/7.14.1UPnP/1.0 XXXXXXXX UPnP/1.0\r\nST: urn:schemas-upnp-org:service:WANIPConnection:1\r\nUSN: uuid:UUID-XXXXXXXX-WAN-CONNECTION-DEVICE-NAZT-TFM3-1::urn:schemas-upnp-org:service:WANIPConnection:1\r\n\r\n'
2024-03-22 09:58:42 [Misc] UPnP: Device description response from < ... Removed ... >
2024-03-22 09:58:42 [Misc] UPnP: Device details: service_type 'urn:schemas-upnp-org:service:WANIPConnection:1'; control_url 'http://192.168.88.1:2828/upnp/control/udszkpvjtd/wanipconn-1'
2024-03-22 09:58:42 [Misc] UPnP: Added service to list
2024-03-22 09:58:42 [Misc] UPnP: Device search response: b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=3600\r\nEXT: \r\nLOCATION: http://192.168.88.1:2828/gateway_description.xml\r\nSERVER: RouterOS/7.14.1UPnP/1.0 MikroTik UPnP/1.0\r\nST: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nUSN: uuid:UUID-MIKROTIK-INTERNET-GATEWAY-DEVICE-NAZT-TFM3::urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\n\r\n'
2024-03-22 09:58:42 [Misc] UPnP: Device location was previously processed, ignoring
2024-03-22 09:58:43 [Misc] UPnP: 1 service(s) detected
2024-03-22 09:58:43 [Misc] UPnP: Trying to redirect external WAN port 2234 TCP => 192.168.88.252 port 2234 TCP
2024-03-22 09:58:43 [Misc] UPnP: Adding port mapping (192.168.88.252 2234, urn:schemas-upnp-org:service:WANIPConnection:1) at url 'http://192.168.88.1:2828/upnp/control/udszkpvjtd/wanipconn-1'
2024-03-22 09:58:43 [Misc] UPnP: Add port mapping request headers: {'Host': '192.168.88.1:2828', 'Content-Type': 'text/xml; charset=utf-8', 'SOAPACTION': '"urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping"'}
2024-03-22 09:58:43 [Misc] UPnP: Add port mapping request contents: b'<?xml version="1.0"?>\r\n<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"><NewRemoteHost></NewRemoteHost><NewExternalPort>2234</NewExternalPort><NewProtocol>TCP</NewProtocol><NewInternalPort>2234</NewInternalPort><NewInternalClient>192.168.88.252</NewInternalClient><NewEnabled>1</NewEnabled><NewPortMappingDescription>NicotinePlus</NewPortMappingDescription><NewLeaseDuration>43200</NewLeaseDuration></u:AddPortMapping></s:Body></s:Envelope>\r\n'
2024-03-22 09:58:43 UPnP: Failed to forward external port 2234: HTTP Error 500: Internal Server Error
2024-03-22 09:58:43 [Misc] Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pynicotine/portmapper.py", line 562, in _add_port_mapping
    self._natpmp.add_port_mapping(self.LEASE_DURATION)
  File "/usr/lib/python3/dist-packages/pynicotine/portmapper.py", line 175, in add_port_mapping
    raise PortmapError(f"NAT-PMP error code {result}")
pynicotine.portmapper.PortmapError: NAT-PMP error code None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pynicotine/portmapper.py", line 569, in _add_port_mapping
    self._upnp.add_port_mapping(self.LEASE_DURATION)
  File "/usr/lib/python3/dist-packages/pynicotine/portmapper.py", line 472, in add_port_mapping
    error_code, error_description = self._request_port_mapping(
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pynicotine/portmapper.py", line 434, in _request_port_mapping
    with urlopen(Request(control_url, data=body, headers=headers), timeout=self.HTTP_REQUEST_TIMEOUT) as response:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 500: Internal Server Error

from nicotine-plus.

kiplingw avatar kiplingw commented on June 5, 2024 2

I can confirm your patch works. Thanks @mathiascode.

from nicotine-plus.

slook avatar slook commented on June 5, 2024

Enable the "Miscellaneous" debug logging catagory for more information about the error.

from nicotine-plus.

slook avatar slook commented on June 5, 2024

It has similarities to the error appearing in #2909 (comment) which additionally provides an error message thown by the OS...

ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host.

I have no suggestions as to how to go about debugging it.

from nicotine-plus.

mathiascode avatar mathiascode commented on June 5, 2024

Looks like a MikroTik router, which we had an issue with in the past: #2200

It was fixed in Nicotine+ 3.2.6, but apparently something has broken since.

@kiplingw Could you try Nicotine+ 3.2.6 and see if UPnP works there? If so, could you either perform a git bisect, or try later Nicotine+ versions in succession, to figure out when the issue was introduced?

from nicotine-plus.

kiplingw avatar kiplingw commented on June 5, 2024

Thanks @mathiascode. Can you point be to an Ubuntu Mantic deb for 3.2.6? I tried looking in the old unstable PPA builds but couldn't find one. I can give it a try, but won't have time to bisect at source level.

from nicotine-plus.

mathiascode avatar mathiascode commented on June 5, 2024

We don't have old debs anymore, but you could run from git:

git clone -b 3.2.6 https://github.com/nicotine-plus/nicotine-plus
cd nicotine-plus
./nicotine

If you could do this for 3.2.6 to 3.3.0 (or until it stops working), it would be helpful. I could look closer at the changes in each version.

Edit: the old releases actually contain debs, but it would be faster to run from git in any case.

from nicotine-plus.

kiplingw avatar kiplingw commented on June 5, 2024

UPnP works fine on 3.2.6, 3.2.7, 3.2.8, and 3.2.9, but breaks on 3.3.0.

from nicotine-plus.

mathiascode avatar mathiascode commented on June 5, 2024

Thanks for checking! Could you post UPnP-related debug logs for 3.2.9 as well?

from nicotine-plus.

kiplingw avatar kiplingw commented on June 5, 2024

No problem @mathiascode:

[2024-03-25 09:46:58] Loading Nicotine+ 3.2.9
[2024-03-25 09:46:58] Listening on port: 2234
[2024-03-25 09:46:58] [Misc] Maximum number of concurrent connections (sockets): 3072
[2024-03-25 09:46:58] [Misc] UPnP: Creating Port Mapping rule...
[2024-03-25 09:46:58] [Misc] UPnP: Discovering... delay=1 seconds
[2024-03-25 09:46:58] [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:service:WANIPConnection:1\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
[2024-03-25 09:46:58] [Misc] UPnP: Sent M-SEARCH IP request 1
[2024-03-25 09:46:58] [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:service:WANPPPConnection:1\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
[2024-03-25 09:46:58] [Misc] UPnP: Sent M-SEARCH PPP request 1
[2024-03-25 09:46:58] [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
[2024-03-25 09:46:58] [Misc] UPnP: Sent M-SEARCH IGD request 1
[2024-03-25 09:46:58] [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:service:WANIPConnection:2\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
[2024-03-25 09:46:58] [Misc] UPnP: Sent M-SEARCH IP request 2
[2024-03-25 09:46:58] [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:device:InternetGatewayDevice:2\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
[2024-03-25 09:46:58] [Misc] UPnP: Sent M-SEARCH IGD request 2
[2024-03-25 09:46:58] [Misc] UPnP: Device search response: b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=3600\r\nEXT: \r\nLOCATION: http://192.168.88.1:2828/gateway_description.xml\r\nSERVER: RouterOS/7.14.1UPnP/1.0 MikroTik UPnP/1.0\r\nST: urn:schemas-upnp-org:service:WANIPConnection:1\r\nUSN: uuid:UUID-MIKROTIK-WAN-CONNECTION-DEVICE-NAZT-TFM3-1::urn:schemas-upnp-org:service:WANIPConnection:1\r\n\r\n'
[2024-03-25 09:46:58] [Misc] UPnP: Device description response from http://192.168.88.1:2828/gateway_description.xml: b'<?xml version="1.0"?>\r\n<root xmlns="urn:schemas-upnp-org:device-1-0">\r\n  <specVersion>\r\n    <major>1</major>\r\n    <minor>0</minor>\r\n  </specVersion>\r\n  <device>\r\n    <deviceType>urn:schemas-upnp-org:device:InternetGatewayDevice:1</deviceType>\r\n    <friendlyName>MikroTik Router</friendlyName>\r\n    <manufacturer>MikroTik</manufacturer>\r\n    <manufacturerURL>https://www.mikrotik.com/</manufacturerURL>\r\n    <modelName>Router OS</modelName>\r\n    <UDN>uuid:UUID-MIKROTIK-INTERNET-GATEWAY-DEVICE-NAZT-TFM3</UDN>\r\n    <iconList>\r\n      <icon>\r\n        <mimetype>image/gif</mimetype>\r\n        <width>16</width>\r\n        <height>16</height>\r\n        <depth>8</depth>\r\n        <url>/logo16.gif</url>\r\n      </icon>\r\n      <icon>\r\n        <mimetype>image/gif</mimetype>\r\n        <width>32</width>\r\n        <height>32</height>\r\n        <depth>8</depth>\r\n        <url>/logo32.gif</url>\r\n      </icon>\r\n      <icon>\r\n        <mimetype>image/gif</mimetype>\r\n        <width>48</width>\r\n        <height>48</height>\r\n        <depth>8</depth>\r\n        <url>/logo48.gif</url>\r\n      </icon>\r\n    </iconList>\r\n    <serviceList>\r\n      <service>\r\n        <serviceType>urn:schemas-microsoft-com:service:OSInfo:1</serviceType>\r\n        <serviceId>urn:microsoft-com:serviceId:OSInfo1</serviceId>\r\n        <SCPDURL>/osinfo.xml</SCPDURL>\r\n        <controlURL>/upnp/control/dvkjpoddxe/osinfo</controlURL>\r\n        <eventSubURL>/upnp/event/erfbppvwuj/osinfo</eventSubURL>\r\n      </service>\r\n    </serviceList>\r\n    <deviceList>\r\n      <device>\r\n        <deviceType>urn:schemas-upnp-org:device:WANDevice:1</deviceType>\r\n        <friendlyName>WAN Device</friendlyName>\r\n        <manufacturer>MikroTik</manufacturer>\r\n        <manufacturerURL>https://www.mikrotik.com/</manufacturerURL>\r\n        <modelName>Router OS</modelName>\r\n        <UDN>uuid:UUID-MIKROTIK-WAN-DEVICE-NAZT-TFM3-1</UDN>\r\n        <serviceList>\r\n          <service>\r\n            <serviceType>urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1</serviceType>\r\n            <serviceId>urn:upnp-org:serviceId:WANCommonIFC1</serviceId>\r\n            <SCPDURL>/wancommonifc-1.xml</SCPDURL>\r\n            <controlURL>/upnp/control/xqhhnwjfjg/wancommonifc-1</controlURL>\r\n            <eventSubURL>/upnp/event/jlvmkmssrl/wancommonifc-1</eventSubURL>\r\n          </service>\r\n        </serviceList>\r\n        <deviceList>\r\n          <device>\r\n            <deviceType>urn:schemas-upnp-org:device:WANConnectionDevice:1</deviceType>\r\n            <friendlyName>WAN Connection Device</friendlyName>\r\n            <manufacturer>MikroTik</manufacturer>\r\n            <manufacturerURL>https://www.mikrotik.com/</manufacturerURL>\r\n            <modelName>Router OS</modelName>\r\n            <UDN>uuid:UUID-MIKROTIK-WAN-CONNECTION-DEVICE-NAZT-TFM3-1</UDN>\r\n            <serviceList>\r\n              <service>\r\n                <serviceType>urn:schemas-upnp-org:service:WANIPConnection:1</serviceType>\r\n                <serviceId>urn:upnp-org:serviceId:WANIPConn1</serviceId>\r\n                <SCPDURL>/wanipconn-1.xml</SCPDURL>\r\n                <controlURL>/upnp/control/udszkpvjtd/wanipconn-1</controlURL>\r\n                <eventSubURL>/upnp/event/ogjotjdkve/wanipconn-1</eventSubURL>\r\n              </service>\r\n            </serviceList>\r\n          </device>\r\n        </deviceList>\r\n      </device>\r\n    </deviceList>\r\n    <presentationURL>http://192.168.88.1/</presentationURL>\r\n  </device>\r\n  <URLBase>http://192.168.88.1:2828</URLBase>\r\n</root>\r\n'
[2024-03-25 09:46:58] [Misc] UPnP: Device details: service_type 'urn:schemas-upnp-org:service:WANIPConnection:1'; control_url '/upnp/control/udszkpvjtd/wanipconn-1'
[2024-03-25 09:46:58] [Misc] UPnP: Added service to list
[2024-03-25 09:46:58] [Misc] UPnP: Device search response: b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=3600\r\nEXT: \r\nLOCATION: http://192.168.88.1:2828/gateway_description.xml\r\nSERVER: RouterOS/7.14.1UPnP/1.0 MikroTik UPnP/1.0\r\nST: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nUSN: uuid:UUID-MIKROTIK-INTERNET-GATEWAY-DEVICE-NAZT-TFM3::urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\n\r\n'
[2024-03-25 09:46:58] [Misc] UPnP: Device location was previously processed, ignoring
[2024-03-25 09:46:58] Loading plugin system
[2024-03-25 09:46:58] [Misc] Enabled plugin(s): core_commands
[2024-03-25 09:46:58] [Misc] Failed to load plugin 'core_commands', could not find it
[2024-03-25 09:46:58] Rescanning shares…
[2024-03-25 09:46:58] 0 folders found before rescan, rebuilding…
[2024-03-25 09:46:59] [Misc] UPnP: 1 service(s) detected
[2024-03-25 09:46:59] [Misc] UPnP: Trying to redirect external WAN port 2234 TCP => 192.168.88.252 port 2234 TCP
[2024-03-25 09:46:59] [Misc] UPnP: Adding port mapping (192.168.88.252 2234/TCP, urn:schemas-upnp-org:service:WANIPConnection:1) at url '192.168.88.1:2828/upnp/control/udszkpvjtd/wanipconn-1'
[2024-03-25 09:46:59] [Misc] UPnP: Add port mapping request headers: {'Host': '192.168.88.1:2828', 'Content-Type': 'text/xml; charset=utf-8', 'SOAPACTION': '"urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping"'}
[2024-03-25 09:46:59] [Misc] UPnP: Add port mapping request contents: b'<?xml version="1.0"?>\r\n<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"><NewRemoteHost></NewRemoteHost><NewExternalPort>2234</NewExternalPort><NewProtocol>TCP</NewProtocol><NewInternalPort>2234</NewInternalPort><NewInternalClient>192.168.88.252</NewInternalClient><NewEnabled>1</NewEnabled><NewPortMappingDescription>NicotinePlus</NewPortMappingDescription><NewLeaseDuration>86400</NewLeaseDuration></u:AddPortMapping></s:Body></s:Envelope>\r\n'
[2024-03-25 09:46:59] [Misc] UPnP: Add port mapping response: b'<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">\r\n  <s:Body>\r\n    <s:Fault>\r\n      <faultCode>s:Client</faultCode>\r\n      <faultString>UPnPError</faultString>\r\n      <detail>\r\n        <UPnPError xmlns="urn:schemas-upnp-org:control-1-0">\r\n          <errorCode>725</errorCode>\r\n          <errorDescription>OnlyPermanentLeasesSupported</errorDescription>\r\n        </UPnPError>\r\n      </detail>\r\n    </s:Fault>\r\n  </s:Body>\r\n</s:Envelope>\r\n'
[2024-03-25 09:46:59] [Misc] UPnP: Router requested permanent lease duration
[2024-03-25 09:46:59] [Misc] UPnP: Creating Port Mapping rule...
[2024-03-25 09:46:59] [Misc] UPnP: Discovering... delay=1 seconds
[2024-03-25 09:46:59] [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:service:WANIPConnection:1\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
[2024-03-25 09:46:59] [Misc] UPnP: Sent M-SEARCH IP request 1
[2024-03-25 09:46:59] [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:service:WANPPPConnection:1\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
[2024-03-25 09:46:59] [Misc] UPnP: Sent M-SEARCH PPP request 1
[2024-03-25 09:46:59] [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
[2024-03-25 09:46:59] [Misc] UPnP: Sent M-SEARCH IGD request 1
[2024-03-25 09:46:59] [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:service:WANIPConnection:2\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
[2024-03-25 09:46:59] [Misc] UPnP: Sent M-SEARCH IP request 2
[2024-03-25 09:46:59] [Misc] UPnP: SSDP request: b'M-SEARCH * HTTP/1.1\r\nHOST: 239.255.255.250:1900\r\nST: urn:schemas-upnp-org:device:InternetGatewayDevice:2\r\nMAN: "ssdp:discover"\r\nMX: 1\r\n\r\n'
[2024-03-25 09:46:59] [Misc] UPnP: Sent M-SEARCH IGD request 2
[2024-03-25 09:46:59] [Misc] UPnP: Device search response: b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=3600\r\nEXT: \r\nLOCATION: http://192.168.88.1:2828/gateway_description.xml\r\nSERVER: RouterOS/7.14.1UPnP/1.0 MikroTik UPnP/1.0\r\nST: urn:schemas-upnp-org:service:WANIPConnection:1\r\nUSN: uuid:UUID-MIKROTIK-WAN-CONNECTION-DEVICE-NAZT-TFM3-1::urn:schemas-upnp-org:service:WANIPConnection:1\r\n\r\n'
[2024-03-25 09:46:59] [Misc] UPnP: Device description response from http://192.168.88.1:2828/gateway_description.xml: b'<?xml version="1.0"?>\r\n<root xmlns="urn:schemas-upnp-org:device-1-0">\r\n  <specVersion>\r\n    <major>1</major>\r\n    <minor>0</minor>\r\n  </specVersion>\r\n  <device>\r\n    <deviceType>urn:schemas-upnp-org:device:InternetGatewayDevice:1</deviceType>\r\n    <friendlyName>MikroTik Router</friendlyName>\r\n    <manufacturer>MikroTik</manufacturer>\r\n    <manufacturerURL>https://www.mikrotik.com/</manufacturerURL>\r\n    <modelName>Router OS</modelName>\r\n    <UDN>uuid:UUID-MIKROTIK-INTERNET-GATEWAY-DEVICE-NAZT-TFM3</UDN>\r\n    <iconList>\r\n      <icon>\r\n        <mimetype>image/gif</mimetype>\r\n        <width>16</width>\r\n        <height>16</height>\r\n        <depth>8</depth>\r\n        <url>/logo16.gif</url>\r\n      </icon>\r\n      <icon>\r\n        <mimetype>image/gif</mimetype>\r\n        <width>32</width>\r\n        <height>32</height>\r\n        <depth>8</depth>\r\n        <url>/logo32.gif</url>\r\n      </icon>\r\n      <icon>\r\n        <mimetype>image/gif</mimetype>\r\n        <width>48</width>\r\n        <height>48</height>\r\n        <depth>8</depth>\r\n        <url>/logo48.gif</url>\r\n      </icon>\r\n    </iconList>\r\n    <serviceList>\r\n      <service>\r\n        <serviceType>urn:schemas-microsoft-com:service:OSInfo:1</serviceType>\r\n        <serviceId>urn:microsoft-com:serviceId:OSInfo1</serviceId>\r\n        <SCPDURL>/osinfo.xml</SCPDURL>\r\n        <controlURL>/upnp/control/dvkjpoddxe/osinfo</controlURL>\r\n        <eventSubURL>/upnp/event/erfbppvwuj/osinfo</eventSubURL>\r\n      </service>\r\n    </serviceList>\r\n    <deviceList>\r\n      <device>\r\n        <deviceType>urn:schemas-upnp-org:device:WANDevice:1</deviceType>\r\n        <friendlyName>WAN Device</friendlyName>\r\n        <manufacturer>MikroTik</manufacturer>\r\n        <manufacturerURL>https://www.mikrotik.com/</manufacturerURL>\r\n        <modelName>Router OS</modelName>\r\n        <UDN>uuid:UUID-MIKROTIK-WAN-DEVICE-NAZT-TFM3-1</UDN>\r\n        <serviceList>\r\n          <service>\r\n            <serviceType>urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1</serviceType>\r\n            <serviceId>urn:upnp-org:serviceId:WANCommonIFC1</serviceId>\r\n            <SCPDURL>/wancommonifc-1.xml</SCPDURL>\r\n            <controlURL>/upnp/control/xqhhnwjfjg/wancommonifc-1</controlURL>\r\n            <eventSubURL>/upnp/event/jlvmkmssrl/wancommonifc-1</eventSubURL>\r\n          </service>\r\n        </serviceList>\r\n        <deviceList>\r\n          <device>\r\n            <deviceType>urn:schemas-upnp-org:device:WANConnectionDevice:1</deviceType>\r\n            <friendlyName>WAN Connection Device</friendlyName>\r\n            <manufacturer>MikroTik</manufacturer>\r\n            <manufacturerURL>https://www.mikrotik.com/</manufacturerURL>\r\n            <modelName>Router OS</modelName>\r\n            <UDN>uuid:UUID-MIKROTIK-WAN-CONNECTION-DEVICE-NAZT-TFM3-1</UDN>\r\n            <serviceList>\r\n              <service>\r\n                <serviceType>urn:schemas-upnp-org:service:WANIPConnection:1</serviceType>\r\n                <serviceId>urn:upnp-org:serviceId:WANIPConn1</serviceId>\r\n                <SCPDURL>/wanipconn-1.xml</SCPDURL>\r\n                <controlURL>/upnp/control/udszkpvjtd/wanipconn-1</controlURL>\r\n                <eventSubURL>/upnp/event/ogjotjdkve/wanipconn-1</eventSubURL>\r\n              </service>\r\n            </serviceList>\r\n          </device>\r\n        </deviceList>\r\n      </device>\r\n    </deviceList>\r\n    <presentationURL>http://192.168.88.1/</presentationURL>\r\n  </device>\r\n  <URLBase>http://192.168.88.1:2828</URLBase>\r\n</root>\r\n'
[2024-03-25 09:46:59] [Misc] UPnP: Device details: service_type 'urn:schemas-upnp-org:service:WANIPConnection:1'; control_url '/upnp/control/udszkpvjtd/wanipconn-1'
[2024-03-25 09:46:59] [Misc] UPnP: Added service to list
[2024-03-25 09:46:59] [Misc] UPnP: Device search response: b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=3600\r\nEXT: \r\nLOCATION: http://192.168.88.1:2828/gateway_description.xml\r\nSERVER: RouterOS/7.14.1UPnP/1.0 MikroTik UPnP/1.0\r\nST: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\nUSN: uuid:UUID-MIKROTIK-INTERNET-GATEWAY-DEVICE-NAZT-TFM3::urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\n\r\n'
[2024-03-25 09:46:59] [Misc] UPnP: Device location was previously processed, ignoring
[2024-03-25 09:47:00] [Misc] UPnP: 1 service(s) detected
[2024-03-25 09:47:00] [Misc] UPnP: Trying to redirect external WAN port 2234 TCP => 192.168.88.252 port 2234 TCP
[2024-03-25 09:47:00] [Misc] UPnP: Adding port mapping (192.168.88.252 2234/TCP, urn:schemas-upnp-org:service:WANIPConnection:1) at url '192.168.88.1:2828/upnp/control/udszkpvjtd/wanipconn-1'
[2024-03-25 09:47:00] [Misc] UPnP: Add port mapping request headers: {'Host': '192.168.88.1:2828', 'Content-Type': 'text/xml; charset=utf-8', 'SOAPACTION': '"urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping"'}
[2024-03-25 09:47:00] [Misc] UPnP: Add port mapping request contents: b'<?xml version="1.0"?>\r\n<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"><NewRemoteHost></NewRemoteHost><NewExternalPort>2234</NewExternalPort><NewProtocol>TCP</NewProtocol><NewInternalPort>2234</NewInternalPort><NewInternalClient>192.168.88.252</NewInternalClient><NewEnabled>1</NewEnabled><NewPortMappingDescription>NicotinePlus</NewPortMappingDescription><NewLeaseDuration>0</NewLeaseDuration></u:AddPortMapping></s:Body></s:Envelope>\r\n'
[2024-03-25 09:47:00] [Misc] UPnP: Add port mapping response: b'<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">\r\n  <s:Body>\r\n    <u:AddPortMappingResponse xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"></u:AddPortMappingResponse>\r\n  </s:Body>\r\n</s:Envelope>\r\n'
[2024-03-25 09:47:00] UPnP: External port 2234 successfully forwarded to local IP address 192.168.88.252 port 2234

from nicotine-plus.

kiplingw avatar kiplingw commented on June 5, 2024

Thanks @mathiascode. I'll give your patch a try whenever the unstable PPA builder has the package ready.

from nicotine-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.