- Revert bandwidthScale when throughput gets smaller
- Don't save coordinates when LogForm is minimized. Otherwise, we get negative values
- activate ConfigForm & ProxyForm & LogForm
User wants to use that server after selected it in the ConfigForm. If user deletes
the server in use, we can't find its index, then the previous logic will revert to
index 0, which is not expected behaviour.
Since we handled 'ServersListBox.SelectedIndex' in various event handlers, we can
trust it all the time.
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
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.
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>
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>
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>
* 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>
Used a method added in .NET 4, user may not have
this version installed, reverting to an older
method seems to be a better solution.
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
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>
-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.
- Drop redundant code.
I should read code carefully, mbed TLS will set operation
when invoking mbedtls_cipher_setkey(), the last param
const mbedtls_operation_t operation is what we want.
- minor changes
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>