Commit Graph
9 Commits
Author SHA1 Message Date
noisyfox f676d2185e Use Socket.ConnectAsync instead of socket.BeginConnect.
Socket.ConnectAsync will create socket and handle the address family
itself. This solves some compatibility issues on win7.

Signed-off-by: noisyfox <timemanager.rick@gmail.com>
2016-08-20 11:36:27 +10:00
noisyfox 53ce1948e4 Unified ipv4, ipv6 and domain connections.
-Use dual-mode socket & DnsEndPoint to handle all domain name connection.
-Move all socket creation into one single function.

So that we could treat domain name just like ipv4 & ipv6 address.
This also solves the async domain solving problem because the os will
hanlde it for us.
2016-08-16 20:40:09 +10:00
noisyfox ad15c7e64b Improve host address handling using DnsEndPoint
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
2016-08-16 17:28:26 +10:00
noisyfox aef88543d2 Fix typo
Update translate

Signed-off-by: noisyfox <timemanager.rick@gmail.com>
2016-08-16 15:47:55 +10:00
noisyfox 22740c5102 Let Socks5 proxy handle server host's domain name.
Don't resolve it locally because socks5 support domain name connection.

Signed-off-by: noisyfox <timemanager.rick@gmail.com>
2016-08-16 02:10:38 +10:00
noisyfox a02cd11dc9 Let proxy module handle name resolving itself.
Fix wrong output in proxyConnectTimer_Elapsed.

Signed-off-by: noisyfox <timemanager.rick@gmail.com>
2016-08-16 01:11:33 +10:00
Syrone Wong a9af9fdfc0 Refactor
- use null conditional access in case some connections been
  cancelled unexpectedly and may cause null reference exception
- Refine error message
- use conditional operator to simplify some code

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-10 15:27:38 +08:00
noisyfox 9493f93c0f Add Socks5 Proxy 2016-06-30 00:09:20 +08:00
noisyfox 95d4e3a0c0 Add proxy support 2016-06-29 22:38:51 +08:00