The lib was binding to all addresses, and then our
UPnP.updateInterfaces() was closing most of them on first run.
Fix the lib to only bind to the non-public and non-deprecated ones,
using the same getLocalAddresses() method as in our code.
Strip % suffixes from addresses before comparing
Fix HTTPMUSocket.getLocalAddress() to return the correct bound address
Throw exception on multicast socket bind failures, don't attempt
further operations on failed sockets
Add toString() to sockets for debugging
Log tweaks
where the service relative URL is an absolute path
and the location absolute URL is below the top level.
Fixes communication with "Freebox" UPnP routers.
ref: http://zzz.i2p/topics/3157
Older miniupnpd 2.0 will send a SSDP search response with an IPv6 location to a IPv4 address,
but newer ones 2.2 won't. So we need to also bind to an IPv6 address for the SSDP search
to receive the router's IPv6 location. Then we can bind to our public IPv6 address
for a port forward and it will work when miniupnpd is configured for "secure".
Also, don't bind a POST request to a mismatched v4/v6 address.
Add support for storing multiple location URLs in DeviceData
Add methods to prefer IPv6 for location URLs
Prefer IPv6 for POST target to WANIPv6FirewallControl service
Add method to bind local address for POST, needed for security checks when forwarding IPv6
Remove IPv6 checks from XML URL parser
Remove unused call in QueryRequest
... as they were being bypassed for known devices.
This fixes erratic UPnP results for devices sending multiple
SSDP search responses, one for IPv4 and one for IPv6.
Temporary fix until we add support for multiple location URLs to DeviceData.
Don't set I2P user agent, spoof MiniUPnPc
Don't convert string-to-bytes-to-string
Don't fallback to alternate code after failure
Don't use HttpURLConnection if proxy enabled
Add location sanity checks
Force Connection: close
Don't attempt to set Host header, HttpURLConnection ignores it
Disable following redirects
Fix malformed HTTP requests
Check HTTP response code in Parser
Check content type in Parser
Debug log in Parser
Show device URL in CLI
Don't retry after parser exception
Close resources in finally block
Unmodified cybergarage-upnp from github rev 9499b03 2015-02-05
https://github.com/cybergarage/cybergarage-upnp/commits/master
which is the same as rev 3ed1af9 2014-07-28 except for
the addition of README.md which we aren't using.
This is post-version 3.0.
Omitted files:
router/java/src/org/cybergarage/xml/parser/XercesParser.java
router/java/src/org/cybergarage/xml/parser/XmlPullParser.java
router/java/src/org/cybergarage/xml/parser/kXML2Parser.java
chmod all files back to 644.
Diverging from 2.1 checkin rev 59eae97dbb470d8c4a1e4dba3a9763e134bb0c53
in prep for merging.
License unchanged.
Compile tested only.
- Rescan for devices periodically and when reachability changes (tickets #661, #959)
- Don't put "I2P" in registered protocol name
- Add uptime to UPnP info
- HTML escaping
- Remove static log on Android
- Javadocs and cleanups
Streaming RTO changes:
apps/streaming/java/src/net/i2p/client/streaming/ConnectionOptions.java
apps/streaming/java/src/net/i2p/client/streaming/TCBShare.java
apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketOptionsImpl.java
new reseed:
applied changes from dbfea0ca35dbf9df85b5703db6f97a9579beb364
through 325a9ed6f0f47eeabb33710073edf973671c63c9
disable RI verifies:
applied changes from 4ef48b93946923e3371ab62719a474d869520697
through a77990850b3534101571c88db4704676645914df
i2prouter bashism fix:
applied changes from b5a0148f96728466561ece9be0e50ac9ad3f1468
through e301d0499f4c688ed3a5febe30bf8098c7f2cdf9
i2psnark increase max piece size, mime type updates:
apps/i2psnark/java/src/org/klomp/snark/Storage.java
apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
apps/i2psnark/mime.properties
UPnP fix:
applied changes from 3d4a5cd3d933f75fdff7696f560c569f4674bd73
through 75e5f5d4e0f0dd44140908bb6e73830e3448bdde