270 Commits
Author SHA1 Message Date
noisyfox 65b9c9f5fa Allow check pre-release version 2016-12-06 22:01:00 +11:00
noisyfox 41827f283e Refine code 2016-11-23 03:22:00 +11:00
noisyfox e7b559f1da Refine code 2016-11-23 02:42:12 +11:00
noisyfox 63816ccdd1 Fix hotkey unregister issue.
Use singleton mode for hotkey callbacks.
2016-11-23 02:34:07 +11:00
noisyfox 86eeba3b7d Fix crash while showing config dialog.
If user manually deleted servers from gui-config.json
2016-11-21 13:50:15 +11:00
Syrone Wong c25e70e888 hotkey: Refine system proxy mode switching logic
Merge 'Switch to PAC' and 'Switch to Global'

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-11-15 18:14:56 +08:00
noisyfox b63bab0d1a Refine LogViewerConfig. Don't store window size in main settings file 2016-11-15 04:23:59 +11:00
Syrone Wong 131114f0c2 Fix #779
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-12 09:36:17 +08:00
Syrone Wong af139d7587 Only integer is allowed for timeout
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-07 08:57:55 +08:00
Syrone Wong 04ed25e16f Add timeout support for server and forward proxy
Also, fix typo in ProxyForm

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-10-06 21:03:45 +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
Syrone Wong 46d95e7411 Get rid of lock(this)
- Use readonly object as lock

Info from stackoverflow:

If I want to be sure that it will be locked for all threads inside my
application:
The lock object has to be static, if it locks access to static state.
Otherwise it has to be instance, because there's no need to lock state of
one class instance, and prevent other threads to work with another class
instance at the same time.

everyone says that the object has to be "readonly" I didn't found the
reason
Well, it doesn't have to be. This is just a best practice, which helps you
to avoid errors.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-29 16:39:58 +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 8cf582803d Fix #740
>_<

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-22 08:40:22 +08:00
Syrone Wong c671c7c32d Add easter egg
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-21 20:00:55 +08:00
Syrone Wong b10f7cb3a6 Refine duplicate behaviour in ConfigForm
- Use insert instead and move to newly inserted
  item instead of the last one after operation

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-20 08:43:34 +08:00
Syrone Wong ef17b72d25 Refine PR #730
Squashed commit of the following:

commit 48eb4d88391b85986190ace825ec0a167df16f8a
Author: Syrone Wong <wong.syrone@gmail.com>
Date:   Sun Sep 18 15:46:09 2016 +0800

    Drop useless interface impl

    Signed-off-by: Syrone Wong <wong.syrone@gmail.com>

commit c0a4f3421a
Author: Logan Zhou <xorcererzc@gmail.com>
Date:   Sun Sep 18 00:58:02 2016 +0800

    Revert "Updated to meet the hint from Wongsyrone."

    This reverts commit 84c8053577.

commit 84c8053577
Author: Logan Zhou <xorcererzc@gmail.com>
Date:   Sun Sep 18 00:52:21 2016 +0800

    Updated to meet the hint from Wongsyrone.

commit 333ccb6d1f
Author: Logan Zhou <xorcererzc@gmail.com>
Date:   Sun Sep 18 00:34:52 2016 +0800

    Added duplicate button to config form.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-18 16:06:00 +08:00
破娃酱 fabe270813 Resize the button 2016-09-17 20:22:29 +08:00
破娃酱 db626dac42 set AutoScaleMode is DPI 2016-09-17 19:27:52 +08: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
Syrone Wong 33b2ca8c8a Refactor
- Only use one instance of LogForm

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-16 00:47:05 +08:00
Syrone Wong be63f96d50 Merge branch 'proxy-form' 2016-09-15 10:21:52 +08:00
破娃酱 836a58775f optimize LogMessageTextBox (#719)
* optimize LogMessageTextBox

* StringBuilder instead
2016-09-14 21:14:33 -05:00
Syrone Wong c1ec851627 Refine ProxyForm
- Save empty config if null ref
- only save config when clicking OK button

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-15 10:09:04 +08:00
Syrone Wong d3c6039c61 Refine Proxy config
- Move to seperate model

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-14 23:19:39 +08:00
破娃酱 2a6da8af3f smooth traffic chart lines (#709) 2016-09-11 06:32:37 +08: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
Syrone Wong f8c9bdda12 Drop redundant type casting
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-09-08 08:20:12 +08:00
破娃酱 707442163d New traffic icon style (#703) 2016-09-07 20:00:31 +08:00
破娃酱 d958c5c393 fix bandwidthScale of the LogForm (#701)
- Revert bandwidthScale when throughput gets smaller
- Don't save coordinates when LogForm is minimized. Otherwise, we get negative values
- activate ConfigForm & ProxyForm & LogForm
2016-09-06 18:46:35 +08:00
Syrone Wong 514bb02098 Fix config selection
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>
2016-09-04 08:04:56 +08:00
Syrone Wong f70b177e56 Misc
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-29 21:30:05 +08:00
noisyfox a7b0ce5bcb Use atomic long read.
Signed-off-by: noisyfox <timemanager.rick@gmail.com>
2016-08-26 12:23:21 +10:00
Syrone Wong 2b4b6cba07 Minor ConfigForm changes
- add event handler for KeyDown
- drop unused code, we don't support
  table and rc4 now

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-17 15:56:00 +08:00
Syrone Wong acf7963de7 OTA is stable now
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-17 15:52:42 +08:00
Syrone Wong 21618ef08d Cleanup
- 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>
2016-08-14 22:29:48 +08:00
Syrone Wong 30aadf0909 Merge pull request #654 from 772807886/master
日志相关修改
2016-08-13 17:54:40 +08:00
Syrone Wong 2fafc52def Refine encryption(#655)
* Refine encryption

- Add AES-CTR, blowfish and camellia ciphers

aes-256-ctr
aes-192-ctr
aes-128-ctr
bf-cfb
camellia-128-cfb
camellia-192-cfb
camellia-256-cfb

- Merge the previous PolarSSL and MbedTLS
- Switch to MbedTLS's cipher layer functions
- Add workaround to set cipher operation(encrypt/decrypt)

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>

* Add function to get MbedTLS cipher context size

and drop hard-coded ctx sizes

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-13 14:28:09 +08:00
金黎明 81188103f2 日志清理改为直接清理文件
日志文件越来越大,原有的清空日志只是清理记录窗口中显示的日志,实际并没有真的删除。
2016-08-13 10:50:21 +08:00
金黎明 6116388262 日志窗口支持记录最大化显示状态 2016-08-13 09:52:45 +08:00
Syrone Wong 3268c03d21 Seperate strategy and servers menugroup
User requested.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-11 16:12:35 +08: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
Syrone Wong 4795340999 Check whether form handle been created(#650)
Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-10 14:15:48 +08:00
Syrone Wong 93e7641446 Minor changes
- display user-friendly server name
- clarify proxy type

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-09 08:24:44 +08:00
Syrone Wong dc591413ce Merge branch 'dev_proxy' of https://github.com/Noisyfox/shadowsocks-windows into Noisyfox-dev_proxy 2016-08-09 07:45:15 +08:00
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
2016-08-08 21:21:53 +10:00
Syrone Wong 3b5d38658f Minor bugfixes (#647)
* Drop unused variable to suppress warning in LogForm

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>

* Fix IPv6 displaying

It is a little ugly, send a PR if you can find a better way.

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
2016-08-08 18:49:24 +08:00
Syrone Wong 20b481ecfd Merge PR #566 from @kimw(#646) 2016-08-08 15:44:22 +08:00
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>
2016-08-08 10:33:17 +08:00