Commit Graph
67 Commits
Author SHA1 Message Date
celeron533 0251130fa5 Socket.ConnectAsync() does not call SocketAsyncEventArgs.Completed when operation completed synchronously.
#1273
2017-08-06 17:17:32 +08:00
Jacob Zuo f0b196c8c3 Fix "4.0.4 launch exception" error (PR #1232) 2017-08-06 12:06:29 +08:00
Syrone Wong 816651ebdc Save user wininet settings as another config file 2017-05-25 17:18:20 +08:00
Allen Zhu 84b69d3dff Chart Refactor (#1019)
* Rename variable 'traffic' to 'trafficPerSecondQueue' and 'trafficInfoQueue'

* Remove class QueueLast<T> by using linq Queue.Last()

* Slight changes, such as rename, move several variables from function domain to class domain to improve performance.
Logic remains the same.

* Update the logic of copying queue from Controller to View.

* Move the TrafficInfo declaration into LogForm class

Overwise, the VS UI designer does not work.
2017-03-31 22:21:01 +08:00
Syrone Wong 9ca61defe8 record user wininet settings and restore after use 2017-03-31 21:47:49 +08:00
Syrone Wong 4c49f1b736 Make the previous portable mode as default
- change dir name to "ss_win_temp" to make things clear.
- throw any exception caught when creating temp folder

To workaround silly cleaning softwares and careless users.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2017-01-11 14:05:11 +08:00
Syrone Wong d21162318e Workaround NotifyIcon's 63 chars limit(#965)
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-12-23 21:41:11 +08:00
noisyfox 6ddd3d486b Revert "Allow LineReader to start with a first package"
This reverts commit a61b10bb67.
2016-12-16 12:19:42 +11:00
noisyfox dd269ac89d Revert "Remove privoxy"
This reverts commit 0d4d01af3b.
2016-12-16 12:19:33 +11:00
noisyfox 09d89b424d Revert "First working built-in http proxy"
This reverts commit 5ba0dffa5d.
2016-12-16 12:19:26 +11:00
noisyfox 511a658fd3 Revert "Reuse buffer from first pakcage"
This reverts commit f2b8e91f81.
2016-12-16 12:18:59 +11:00
noisyfox efe6d5ba81 Revert "http -> shadowsocks protocol directly"
This reverts commit b04c59d8e6.
2016-12-16 12:18:51 +11:00
noisyfox 0c055caffd Add the missing semicolon in global proxy bypass list 2016-12-14 22:20:11 +11:00
noisyfox c0299090c4 Merge branch 'proxy_dev' 2016-12-09 02:48:22 +11:00
noisyfox de4a2f862b Update global proxy bypass list 2016-12-09 02:47:12 +11:00
noisyfox 2c15520230 Remove unnecessary volatile 2016-12-09 02:17:46 +11:00
noisyfox b04c59d8e6 http -> shadowsocks protocol directly
No more http->socks5 transform.
2016-12-09 02:17:46 +11:00
noisyfox f2b8e91f81 Reuse buffer from first pakcage
Remove some debug output
2016-12-09 02:17:46 +11:00
noisyfox 5ba0dffa5d First working built-in http proxy 2016-12-09 02:17:46 +11:00
noisyfox 0d4d01af3b Remove privoxy 2016-12-09 02:17:46 +11:00
noisyfox a61b10bb67 Allow LineReader to start with a first package 2016-12-09 02:17:46 +11:00
noisyfox 5c5f753721 Use external agents to set system proxy.
This fix the proxy issue on win10 insider preview.
2016-12-09 02:15:29 +11:00
noisyfox 41827f283e Refine code 2016-11-23 03:22:00 +11:00
noisyfox 63816ccdd1 Fix hotkey unregister issue.
Use singleton mode for hotkey callbacks.
2016-11-23 02:34:07 +11:00
noisyfox cfc6e674da Catch and log known exceptions in SystemProxy 2016-11-12 19:38:47 +11:00
noisyfox c908caa584 Use OpenRegKey 2016-11-06 01:25:22 +11:00
noisyfox aa9fd8ec06 Check .NET Framework version on startup 2016-11-05 23:23:04 +11:00
Syrone Wong 217e818339 Cleanup
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-26 16:50:28 +08:00
Syrone Wong 4b99a5c210 Make registry opening more generic
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-20 08:05:25 +08:00
Syrone Wong 5721769c6d Refine Remote Access Service query for WinVista and later
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-16 16:43:11 +08:00
Syrone Wong 1c1cc62235 System proxy support for Remote Access Service
e.g. Dial-up connection and VPN

- use INTERNET_OPTION_PROXY_SETTINGS_CHANGED instead of INTERNET_OPTION_SETTINGS_CHANGED

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-16 12:36:12 +08:00
Syrone Wong 90ae73057e Misc
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-11 17:00:19 +08:00
Syrone Wong 10702a029c Misc
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-09 11:01:43 +08:00
Syrone Wong 70bff7d7cc Use wininet API to setup system proxy
Get rid of tricky registry handling

Several files come from https://code.msdn.microsoft.com/windowsapps/CSWebBrowserWithProxy-c8535715/view/SourceCode

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-06 16:12:35 +08:00
Syrone Wong c46149a375 Fix hotkey dispose
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-30 15:15:48 +08:00
Syrone Wong 6e8d6d3d21 Adjust garbage collection
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-30 15:15:39 +08:00
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.
2016-09-24 23:37:24 -05:00
Syrone Wong 156b3acd9b Misc
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-22 09:45:08 +08:00
Syrone Wong c8d070fb09 Free unmanaged memory
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-21 20:01:52 +08:00
noisyfox 5e082e2961 Fix comment
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
2016-09-17 15:12:48 +10:00
noisyfox 2a12ac5578 Merge branch 'master' of https://github.com/shadowsocks/shadowsocks-windows.git 2016-09-17 14:57:54 +10:00
Syrone Wong 99bdec334c Add global hotkey support (#724)
Design:

Use the plain string for both config and hotkey parsing
and make use of KeyConverter, ModifierKeysConverter
to make it more rubust.

Find corresponding label (to display operation result) and callback (to do the real work) based on textbox name. In this case, they should be named as `<Feature-Name><Control-Name>`.

ShowLogsTextBox,
ShowLogsLabel,
ShowLogsCallback.

If this requirement doesn't meet, throw an exception at runtime.

Logic:

How to input keys:
1. put focus in the corresponding textbox
2. press the key combination you want to use
3. when you think it is ready, release all keys
4. the textbox shows your input

How to change keys:
1. put focus in the corresponding textbox
2. press BackSpace to clear content
3. re-input new one

How to deactivate:
1. clear content in the textbox
2. press OK button

Meaning of label color:
- Green: this combination is not occupied by other programs and register successfully
- Yellow: this combination is occupied by other programs and you have to change to another one
- Transparent without color: initial status

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-16 23:42:16 -05:00
破娃酱 7586739a52 remove all tuple (#718) 2016-09-15 22:02:55 -05:00
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>
2016-09-14 04:23:18 +10:00
破娃酱 59c315d465 new traffic chart style (#704)
* new traffic chart style
- remove invoke
- force to set AxisY.Maximum not zero
- format LogForm.cs

* avoid data race
2016-09-08 15:24:46 +08:00
noisyfox e364457b1b Fix a memory leak.
Caused by not call SocketAsyncEventArgs.Dispose().
2016-09-03 15:17:16 +08:00
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 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>
2016-08-18 19:31:01 +08:00
Syrone Wong 8637277c27 Cleanup
- drop unused using directive
- add a comment

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-17 15:58:00 +08:00
Syrone Wong ddb7374432 Refine Windows registry again(#512)
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>
2016-08-17 11:13:35 +08:00