noisyfox
0266ad9d59
Remove redundant lock.
Lock is evil.
This will actually affect the accuracy of GetDelta because
inboundDelta and outboundDelta may be calculated based on
the data collected at different time (eg. UpdateOutbound
get called before Interlocked.Read(ref _outbound)).
But that's not a problem. We can tolerate this little
inaccuracy. Besides, the _inbound, _outbound, _lastInbound
and _lastOutbound will be totally good because we use Interlocked.
9 years ago
Syrone Wong
f70b177e56
Misc
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
9 years ago
noisyfox
5b2327776a
Fix a null ref exception.
9 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>
9 years ago
noisyfox
65d72fdfed
New approach to record and calculate inbound/outbound speed.
Use lock to sync between threads.This should fix issue #679
and other same issue.
Fix a bug in UpdateSpeed() that only save the first xxxSpeedRecord.
9 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>
9 years ago
noisyfox
28fe2fdc54
Only output some debug exceptions in debug mode.
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
9 years ago
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>
9 years ago
noisyfox
b335e6c8f5
Revert changes in UDPRelay.cs
UDP SendTo doesn't support DnsEndPoint.
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
9 years ago
noisyfox
80fc8b4ccf
Fix an exception caused by process.MainModule.
Try to access a dead process's MainModule will cause
"A 32 bit processes cannot access modules of
a 64 bit process." exception on win7 x64.
Simply ignore it.
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
9 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>
9 years ago
Noisyfox
a1eef6eac1
Multiple instances of ss_privoxy ( #665 )
* Use job object to manage polipo service's external processes.
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
* Only kill those ss_privoxy.exe created by this ss instance.
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
* Update README
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
9 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>
9 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.
9 years ago
noisyfox
ad15c7e64b
Improve host address handling using DnsEndPoint
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
9 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>
9 years ago
Syrone Wong
5d554d966a
Bump version and update CHANGES
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
9 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>
9 years ago
Syrone Wong
93e7641446
Minor changes
- display user-friendly server name
- clarify proxy type
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
10 years ago
Noisyfox He
e23641c522
Improved debug info output by using isVerboseLogging
10 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
10 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>
10 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>
10 years ago
Syrone Wong
f21c534704
minor changes
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
10 years ago
Syrone Wong
0494f95fbb
Merge branch 'log_connect_to' of https://github.com/kimw/shadowsocks-windows into kimw-log_connect_to
10 years ago
Syrone Wong
6a8a09983e
Merge fixes from @GangZhuo , close #478 ( #638 )
Squashed commit of the following:
commit e280c2385c
Merge: 579039f 87aa9eb
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date: Wed Mar 16 04:02:27 2016 -0400
Merge remote-tracking branch 'origin/master'
commit 579039fe40
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date: Fri Mar 4 21:45:23 2016 +0800
log unhandle exception
commit 8d863f1d5f
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date: Fri Mar 4 21:44:54 2016 +0800
fix Availability Statistics
commit b3ce1c698a
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date: Fri Mar 4 21:07:54 2016 +0800
tiny refactor
commit 0f7d39e27e
Merge: bd7078a b01aced
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date: Fri Mar 4 20:02:58 2016 +0800
Merge remote-tracking branch 'origin/master'
commit bd7078aa4f
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date: Fri Mar 4 20:01:58 2016 +0800
tiny refactor
commit 49adb95b6e
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date: Fri Mar 4 03:44:26 2016 -0500
log more Ping information for debug
commit 2aa0620ddd
Author: Gang Zhuo <gang.zhuo@gmail.com>
Date: Fri Mar 4 03:04:10 2016 -0500
reduce 3rd packages
[solve conflicts and squash to make history clean]
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
10 years ago
noisyfox
4a1aa01a4f
Enable proxy switch
10 years ago
noisyfox
95d4e3a0c0
Add proxy support
10 years ago
kimw
f9296b49b1
clean up buggy parameter.
Replaced SocketFlags.None (an enum which euqals 0) from zero.
10 years ago
kimw
ff04a2a18a
clean up code in C# 6
10 years ago
kimw
0cee110e59
renamed private properties with prefix underline
10 years ago
kimw
4b3ec38691
featured print "connect to hostname:port" to log
10 years ago
kimw
13e125d364
bump up version
10 years ago
Gang Zhuo
3da00178de
better way to kill privoxy
10 years ago
Gang Zhuo
4325b7f6f9
fix https://github.com/shadowsocks/shadowsocks-windows/issues/466
10 years ago
Gang Zhuo
a9589dba8b
bump 3.0
10 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.
10 years ago
icylogic
7914d704d9
finish basic calculation
10 years ago
icylogic
e0e0f646b0
fix the chart
10 years ago
icylogic
3b7cbf8020
fix weird logic for reading files.
10 years ago
icylogic
2086b5900d
Merge remote-tracking branch 'upstream/master' into feature/statistics_ui
# Conflicts:
# shadowsocks-csharp/Controller/Service/AvailabilityStatistics.cs
# shadowsocks-csharp/Controller/Strategy/StatisticsStrategy.cs
# shadowsocks-csharp/View/StatisticsStrategyConfigurationForm.cs
10 years ago
Licshee
a8ffc60d31
updated StringEx to 0.2, in favor of s.NonWhiteSpaceLines()
10 years ago
Licshee
732866c095
Merge branch 'master' into using-StringEx
10 years ago
Licshee
281dfe028a
.
10 years ago
Licshee
4a45d60c40
more reliable & maintainable extension methods
10 years ago
Licshee
0c7597cdf4
moar
10 years ago
icylogic
06d60f54bc
redesign statistics form
10 years ago
Licshee
859474b577
misc improve
10 years ago
icylogic
bec1f808b3
add an option for Ping tests (disabled by default) and improve the readability of the code
10 years ago
icylogic
586caab7c4
follow CA1001: Types that own disposable fields should be disposable
https://msdn.microsoft.com/library/ms182172.aspx
10 years ago