Commit Graph

88 Commits

Author SHA1 Message Date
zzz 055e916a83 UPnP: Fail fast if no local addresses, don't blame on port conflict 2026-03-23 10:19:39 -04:00
zzz d664af0a32 Patches to BouncyCastle 1.80 source files to minimize dependencies 2025-06-13 08:51:34 -04:00
zzz 1705b6e25e BouncyCastle 1.80 source files, unmodified, as a base for future merges
will not compile
2025-06-13 08:48:34 -04:00
zzz 7b52b4431a Build: Use package-info.java for empty dirs
instead of package.html and Dummy.java
2025-03-05 10:16:55 -05:00
zzz c7e46ca52c UPnP: Make case of HTTP headers more standard 2023-11-29 15:57:14 -05:00
zzz 5399aa459f UPnP: Fix missing port in Host header causing failures on libupnp-based devices 2023-11-29 15:55:58 -05:00
zzz f7d134066d UPnP: Catch AssertionError when closing SSDP multicast socket
Reported on Windows 10
ref: http://zzz.i2p/topics/3500
2022-12-30 05:33:10 -05:00
zzz 86996dde28 UPnP: Don't bind HTTP listen sockets to all addresses at startup
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.
2022-05-27 11:18:48 -04:00
zzz 81255e19ae Transport: Fix thrashing of UPnP IPv6 listen sockets
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
2022-05-11 11:54:25 -04:00
zzz 7d1656c20f UPnP: Fix construction of absolute URLs
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
2021-08-07 08:39:05 -04:00
zzz d93e16e52e UPnP: Bind to IPv6 addresses for search responses
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.
2021-06-11 09:29:16 -04:00
zzz b88c8a4f6a UPnP: Fix IPv6 address check (ticket #2811) 2021-05-23 07:38:28 -04:00
zzz 03c657b466 javadoc fix 2021-03-19 13:02:35 -04:00
zzz c1c2f4bb2e UPnP: Reduce some log levels
of logggung that was added during IPv6 development
2021-03-08 09:14:19 -05:00
zzz eb535762c4 UPnP: IPv6 part 2
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
2021-02-28 08:08:07 -05:00
zzz fa3ca565ca UPnP: Move IPv6 checks from Parser to ControlPoint
... 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.
2021-02-27 12:35:42 -05:00
idk fdb4ec7d7c Switch from 'host name' to 'hostname' 2021-02-01 23:12:49 -05:00
zzz af4c41ef08 UPnP: Race-proof the fix 2021-01-30 08:46:29 -05:00
zzz 33397433ac UPnP: Fix NPE (android gitlab ticket #1) 2021-01-30 08:35:33 -05:00
zzz f3e821a65d UPnP fixes part 7:
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
2020-05-27 12:49:15 +00:00
zzz 6aa81f7ec6 UPnP fixes part 6:
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
2020-05-22 18:22:56 +00:00
zzz 1af32bfe79 UPnP fixes part 4:
Update SSDP listening sockets on interface changes
2020-05-17 14:56:30 +00:00
zzz e6dcfaee15 Transport: Move I2PHMac to ssu package
Remove Mac interface
2019-08-29 12:07:30 +00:00
zzz 232b7f30d5 Build: Fix javadoc errors with Oracle JDK
Tested with 12.0.2
2019-08-19 16:33:19 +00:00
zzz 6adc665fd3 Build: Move SSU HMAC implementation from core to router 2019-07-12 18:40:46 +00:00
zzz b9726a0af8 UPnP: Remove finalize() in HTTPSocket (ticket #2490) 2019-05-02 14:08:25 +00:00
zzz 365f5a8c7b UPnP redundant casts 2019-03-10 12:58:23 +00:00
str4d a67ea4b2f2 Cleanups: Close resources via try-finally
We can't use try-with-resources until we bump the minimum-supported Android
version for the client library to API 19.
2017-12-09 01:02:17 +00:00
zzz 8a89b3da29 Fix calls to Class.newInstance() deprecated in Java 9 2017-02-15 17:01:02 +00:00
zzz 9dab3b0dfe javadoc fixes part 12 (ticket #1894) 2017-01-27 02:27:53 +00:00
zzz bd1354f95b javadoc fixes part 10 (ticket #1894) 2017-01-27 01:49:19 +00:00
zzz fb74f41692 javadoc fixes part 9 (ticket #1894) 2017-01-27 01:41:06 +00:00
zzz 5db89d8743 javadoc fixes part 8 (ticket #1894) 2017-01-27 01:36:26 +00:00
zzz 16a551f7ce UPnP: Prevent NPE on socket creation fail (ticket #1681) 2016-11-13 16:30:51 +00:00
zzz 3ac8e5f54f UPnP: Prevent exception on bad HTTP header (ticket #1480) 2016-11-13 15:11:59 +00:00
z3r0fox 79bb3f6cc4 Added @Deprecated annotations to router classes/methods 2016-02-06 20:39:58 +00:00
zzz fe69d3b8f7 UPnP: Fix "content not allowed in trailing section" (tickets #481, #1653)
patch from 'kay" in #1653, dev agreement received
2015-09-04 21:05:38 +00:00
zzz dd265bbd54 Updates after review:
Remove meeh.i2p as update host (ticket #1515)
Re-add 193.xxx https reseed
Fix SocketManagerFactory property handling
Restore UPnP locale fix lost in the merge
i2ptunnel finals
I2NP unique id fixes
duplicate done() in ReseedChecker
bigger langbox in CSS
reformatting
Javadocs
2015-04-11 19:34:34 +00:00
dev d1ac24c65d findbugs: Covariant equals() method defined, Object.equals(Object) inherited 2015-04-04 19:49:37 +00:00
zzz 79dc01f7e4 Javadoc: missing package.html files in router.jar (ticket #1109) 2015-03-22 16:35:21 +00:00
zzz 8dde7b70db UPnP:
- New fix Device.getAbsoluteURL() once again after merge
 - Don't load local files in Service.getSCPDNode()
2015-03-17 21:29:03 +00:00
zzz 64faeef6c4 restore previous javadoc fixes after merge 2015-03-17 19:11:21 +00:00
zzz c79e4aeaea propagate from branch 'i2p.i2p' (head 97716ce246bcbee153cf1a28253bac2385ddf7be)
to branch 'i2p.i2p.zzz.upnp' (head e508f71db90f382080b98d11efbdb4d88c1bc406)
2015-03-17 18:49:37 +00:00
zzz 8b6a86e391 merge of 'c5e201203713f0fefcdef642ca50597f8936c79c'
and 'fbd68f812db1e891f96e212b3a5938beec0233b5'
2015-03-17 18:21:12 +00:00
zzz 92daf4a8df Cyberlink for Java v3.0 + (2015-02-15) from github:
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.
2015-03-17 14:36:05 +00:00
zzz 59373f9bdf UPnP:
- 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
2015-01-28 15:04:59 +00:00
zzz d87178fec3 UPnP: Comment out unused parsers 2014-10-08 17:47:19 +00:00
zzz 0e48557b48 * SSU: Fix 100% CPU after socket failure
* UPnP: Catch reported error on FreeBSD
2014-09-22 13:22:35 +00:00
str4d 0f7a3dba87 Catch AIOOB in upnp code (triggered in I2P Android on shutdown) 2014-08-30 02:38:27 +00:00
zzz 9655e79d26 UPnP: Disable external entities in XML parser 2014-08-06 18:13:54 +00:00