Syrone Wong
d5f24df128
Don't suppress exceptions
It is better to log them.
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
8 years ago
Syrone Wong
a0fd003099
Close connection in the caller if exception is caught
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
8 years ago
Noisyfox
35fc73b58b
Add HTTP proxy support in forward proxy ( #745 )
* Add HTTP proxy support in forward proxy
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
* Typo
* Throw exception if forward proxy not supported.
8 years ago
noisyfox
063cf111cb
Fix a bug that a TCPHandler may be shutdown immediately
after creation.
Becuase we put handler.Start() call after timeout check and
lastActivity is initialized in Start(), this will lead to a
incorrect timeout.
Also because we will call handler.Start() right after the
constructor and timeout check, so it makes no difference
where we put the initializtion of lastActivity. We won't do
this again in Start() because DateTime.Now will consumes a
lot of cpu time.
8 years ago
noisyfox
2a12ac5578
Merge branch 'master' of https://github.com/shadowsocks/shadowsocks-windows.git
8 years ago
Syrone Wong
6e6be823ad
Fix #710 by @breakwa11
- Drop irrelevant changes
- Closes #723
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
8 years ago
Syrone Wong
d3c6039c61
Refine Proxy config
- Move to seperate model
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
8 years ago
noisyfox
05063f074a
Fix an issue that the socket may not be released.
- New wrapper to handle tcp socket connection.
- Fix some memory leak.
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
8 years ago
noisyfox
e364457b1b
Fix a memory leak.
Caused by not call SocketAsyncEventArgs.Dispose().
8 years ago
Syrone Wong
f70b177e56
Misc
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
8 years ago
noisyfox
ed54b249db
Close services while closing listener.
Now it will close all existing TCP relay connections
while reloading the listener.
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
8 years ago
noisyfox
37d894594e
Use immutable remote reference during async process.
To prevent "The IAsyncResult object was not returned from
the corresponding asynchronous method on this class." exception.
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
8 years ago
noisyfox
2ed8ab50cd
Only parse socks5 header once per connection.
To avoid unreadable and uncessary output
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
8 years ago
noisyfox
6cb58b229d
Fix a null ref exception.
At that time the remote even doesn't exist.
Also this debug output doesn't make any sense because when handling
udp request, this tcp connection won't have any meaningful data.
So I simply removed these two lines.
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
8 years ago
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.
8 years ago
noisyfox
ad15c7e64b
Improve host address handling using DnsEndPoint
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
8 years ago
noisyfox
a02cd11dc9
Let proxy module handle name resolving itself.
Fix wrong output in proxyConnectTimer_Elapsed.
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
8 years ago
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>
8 years ago
Syrone Wong
93e7641446
Minor changes
- display user-friendly server name
- clarify proxy type
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
8 years ago
Noisyfox He
e23641c522
Improved debug info output by using isVerboseLogging
8 years ago
Noisyfox He
6a3e06cdb3
Merge branch 'master' of https://github.com/shadowsocks/shadowsocks-windows.git into dev_proxy
# Conflicts:
# shadowsocks-csharp/Controller/Service/TCPRelay.cs
# shadowsocks-csharp/Controller/ShadowsocksController.cs
# shadowsocks-csharp/View/MenuViewController.cs
8 years ago
Syrone Wong
d3acb3e681
Refine verbose logging handling
I can't wait until PR #604 get merged, do it manually.
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
8 years ago
Syrone Wong
fb3fcdb90d
Add verbose logging to log every connection
Note:
- Added a configuration entry, user should add this
by hand or reset from scratch.
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
8 years ago
Syrone Wong
f21c534704
minor changes
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
8 years ago
noisyfox
4a1aa01a4f
Enable proxy switch
9 years ago
noisyfox
95d4e3a0c0
Add proxy support
9 years ago
kimw
f9296b49b1
clean up buggy parameter.
Replaced SocketFlags.None (an enum which euqals 0) from zero.
9 years ago
kimw
ff04a2a18a
clean up code in C# 6
9 years ago
kimw
0cee110e59
renamed private properties with prefix underline
9 years ago
kimw
4b3ec38691
featured print "connect to hostname:port" to log
9 years ago
icylogic
a99fef37d3
track multiple servers at the same time
Correct AvailabilityStatistics's behavior under special strategies like "LoadBalance", which may switch the server several times in a short period.
9 years ago
icylogic
7599704d1f
add speed to statistics
9 years ago
Gang Zhuo
b918cb85ae
tiny fix
9 years ago
kimw
2cce646700
featured show bandwidth in log form's title
9 years ago
kimw
0b16ef7445
Merge upstream
# Conflicts:
# README.md
# shadowsocks-csharp/Controller/Service/AvailabilityStatistics.cs
# shadowsocks-csharp/Controller/Service/PACServer.cs
# shadowsocks-csharp/Controller/Strategy/SimplyChooseByStatisticsStrategy.cs
# shadowsocks-csharp/Data/cn.txt
# shadowsocks-csharp/Model/Configuration.cs
# shadowsocks-csharp/Model/LogViewerConfig.cs
# shadowsocks-csharp/View/LogForm.Designer.cs
# shadowsocks-csharp/View/LogForm.cs
# shadowsocks-csharp/View/MenuViewController.cs
9 years ago
10people
d0e16dc658
Add debug log in network transfer.
9 years ago
Gang Zhuo
29d70acfb5
replace 'one_time_auth' to 'auth'
9 years ago
Gang Zhuo
098640e792
refact
9 years ago
Gang Zhuo
c5e27486fb
Protocol V2
9 years ago
Gang Zhuo
3aac1cfcfc
Refine the authentication for true CCA
9 years ago
Gang Zhuo
19085a3cd1
Update the hash function
follow with 5ae4df94e4
9 years ago
Gang Zhuo
eae3943556
reserve buffer for one-time auth
9 years ago
Gang Zhuo
ca8df1b51f
fix buffer size
9 years ago
Gang Zhuo
1564e9ff81
support onetime auth
9 years ago
kimw
0a733c61b8
fixed: standardize Logging usage
1. Add Logging.Info()
2. Console.WriteLine() -> Logging.Info()
3. Console.WriteLine() in exceptions -> Logging.LogUsefulException()
9 years ago
kimw
f6085d9362
Merge remote-tracking branch 'upstream/master'
9 years ago
clowwindy
7081819390
timeout 30min -> 15min
9 years ago
kimw
758c497eba
same the source code format.
1/ removed dual empty line
2/ removed tailing spaces
3/ converted tabs into spaces
4/ added some TODO comments
9 years ago
clowwindy
750ee4fa5f
add handler timeout
9 years ago
clowwindy
3bc77d212a
reduce cache size
9 years ago