Commit Graph

60 Commits

Author SHA1 Message Date
Cameron Gutman
51ae1c8770 Fix socket errors being clobbered by closesocket() 2020-08-28 18:46:36 -07:00
Cameron Gutman
dbf43ac7a1 Don't attempt to relocate WoL port 9 2020-08-14 17:54:48 -07:00
Cameron Gutman
893aa76c9c Replace hardcoded constant with #define 2020-08-14 17:52:59 -07:00
Cameron Gutman
21d8c71a2c Log the internal port for the UPnP mappings 2020-08-14 17:51:06 -07:00
Cameron Gutman
41ef072c9b Validate the port number of loopback traffic 2020-08-14 17:48:55 -07:00
Cameron Gutman
53246bd4c5 Don't redirect stdout for standalone exe invocation 2020-08-14 17:48:14 -07:00
Cameron Gutman
944c8993e8 Elevate priorities for the UDP relay threads 2020-08-11 01:12:48 -07:00
Cameron Gutman
b6508d9024 Remove superfluous select() call 2020-08-11 00:59:13 -07:00
Cameron Gutman
05413a554c Work around IGDs that deduplicate entries based on the internal port
This is a violation of the UPnP IGD specification but we can relay through an alternate port as a workaround.
2020-08-10 21:16:21 -07:00
Cameron Gutman
5f015acdaa Improve robustness for broken UPnP IGDs 2020-08-09 16:01:39 -07:00
Cameron Gutman
df286ef56d Use indefinite mappings if the IGD returns unexpected error codes 2020-08-09 15:30:48 -07:00
Cameron Gutman
47d60b9f24 Leave permanent mappings alone during the update cycle 2020-08-09 15:16:05 -07:00
Cameron Gutman
659d3aea23 Open UDP 47009 for WoL
It may work where UDP 9 fails because it's an unprivileged port
2020-08-09 14:00:14 -07:00
Cameron Gutman
b37b99e9c3 Remove the "buggy router" warning that was actually caused by a libnatpmp bug 2019-09-28 14:03:32 -07:00
Cameron Gutman
6f3898e4b4 Untabify source 2019-07-28 13:25:51 -07:00
Cameron Gutman
51dc3142ca Retarget to VS2019 2019-07-13 11:29:55 -07:00
Cameron Gutman
204dde8a73 Avoid attempting to delete UPnP rules if the description doesn't match 2019-04-05 00:39:27 -07:00
Cameron Gutman
1bc6cc5634 Fix log rotation 2019-03-28 19:42:09 -07:00
Cameron Gutman
0941cc5bc1 Set additional version attributes 2019-03-28 19:41:14 -07:00
Cameron Gutman
a7e41d15f5 Add UTC time prefix to logs 2019-03-28 19:37:46 -07:00
Cameron Gutman
3c92a79fe2 Fix parsing bug handling empty SSDP headers 2019-01-04 23:02:07 -08:00
Cameron Gutman
18b704b85a Use moonlight-stream.org instead of google.com to avoid issues in China 2019-01-04 19:22:46 -08:00
Cameron Gutman
218c0d7385 Increase SSDP UDP socket recv buffer size 2018-11-30 00:32:57 -08:00
Cameron Gutman
e7f03cfa93 Add missing check for PCP version 2018-11-29 23:57:14 -08:00
Cameron Gutman
c7565256b5 Add support for PCP on the first hop 2018-11-20 18:09:28 -08:00
Cameron Gutman
3145d34381 Print computer name when looking for mappings 2018-11-20 17:12:30 -08:00
Cameron Gutman
c6837c95f1 Remove IPv6 UPnP code from MISS 2018-11-20 17:12:13 -08:00
Cameron Gutman
23ef57c20f Remove echo port from WOL list to avoid possible reflection from internal network hosts 2018-11-18 10:58:58 -08:00
Cameron Gutman
e7b5b07c4a Several minor bugfixes from final pre-release testing 2018-11-10 00:21:01 -08:00
Cameron Gutman
732b430da8 Implement best-effort forwarding for Wake-on-LAN 2018-11-09 17:06:31 -08:00
Cameron Gutman
5aea5aedab Ensure IPv6 PCP requests come from the correct address by explicitly binding 2018-11-08 19:46:43 -08:00
Cameron Gutman
92eeadadca Use PCP for mapping on CGNs 2018-11-08 19:19:18 -08:00
Cameron Gutman
e7e37b8dfb Use a per-server PCP nonce to fix unmapping 2018-11-08 18:09:27 -08:00
Cameron Gutman
3906de1a3a Initial PCP implementation (not fully tested) 2018-11-07 22:06:40 -08:00
Cameron Gutman
c47014887a Avoid making duplicate NAT-PMP requests to a UPnP gateway that was disconnected 2018-11-07 21:13:27 -08:00
Cameron Gutman
9dd169ba02 Fix memory leak if UPnP gateway lacked IPv6FC support 2018-11-07 18:00:54 -08:00
Cameron Gutman
4ee5b9d28a Fix handling of malformed SSDP responses 2018-11-07 17:55:11 -08:00
Cameron Gutman
176a1762d6 Allow deletion of upstream mappings if we can guarantee they are ours 2018-11-07 17:44:49 -08:00
Cameron Gutman
2ba42e6dd5 Handle large SSDP responses better 2018-11-07 17:35:46 -08:00
Cameron Gutman
852ee8df8d Fix socket leak in getUPnPDevicesByAddress() 2018-11-07 17:30:18 -08:00
Cameron Gutman
1b3fef5408 Fix RFC 6598 netmask for CGN 2018-11-07 17:28:33 -08:00
Cameron Gutman
1137825a4f Add the ability to punch through multiple NATs in some situations 2018-11-06 21:57:17 -08:00
Cameron Gutman
c964830213 Move IPv6 FW check to the correct location 2018-11-06 20:39:59 -08:00
Cameron Gutman
1b8f15e259 Wait for the NAT-PMP response when deleting a conflicting entry 2018-11-06 20:24:45 -08:00
Cameron Gutman
1c9ecbfb78 Add traceroute code for experimental double NAT handling 2018-11-05 21:38:36 -08:00
Cameron Gutman
2899843900 Avoid using IPv6 FC if no control URL was present 2018-11-05 19:43:50 -08:00
Cameron Gutman
e62ed6ccc5 Try deleting conflicting UPnP mappings 2018-11-05 17:51:37 -08:00
Cameron Gutman
774878ed17 Per RFC 6886, we should set publicport to 0 when deleting a NAT-PMP port mapping 2018-10-23 21:50:33 -07:00
Cameron Gutman
d9320bed7d Print a version header on logs and console output 2018-10-23 17:36:48 -07:00
Cameron Gutman
222ed5a568 Catch bogus private port values returned for NAT-PMP conflict 2018-10-23 17:11:55 -07:00