Commit Graph

47 Commits

Author SHA1 Message Date
ahxxm 5cd9f04948 Refactor (#615)
* make tcprelay.py less nested

* import traceback module at the top

* make loops in DNSResolver less nested

* make manager.py less nested

* introduce exception_handle decorator

make try/except block more clean

* apply exception_handle decorator to tcprelay

* quote condition judgement

* pep8 fix
2016-10-07 12:30:17 +08:00
clowwindy d774286dc0 rename utils module into shell
Since utils is ambiguous, we want to give the module a more
clear role.
2015-02-10 17:26:10 +08:00
clowwindy cb7062e1c1 implement utils.print_exception()
Previously we used logging.error(e) and traceback.print_exc()
to output error stack trace. The problem is, we want to
output the stack trace only when verbose > 0. The if statement
scattered around the code. So we replaced them with the new
utils.print_exception() call.
2015-02-10 17:21:29 +08:00
clowwindy dfd81af844 support --version 2015-02-09 14:43:11 +08:00
clowwindy ce805f0aea license under Apache License v2.0 2015-02-03 14:10:36 +08:00
clowwindy 0cd261dd10 catch KeyError 2015-02-02 16:22:56 +08:00
clowwindy 7aa37cad8e check cipher before daemon start
fix #280
2015-02-02 15:46:22 +08:00
clowwindy ae99698b4e implement --user
fix @278
2015-02-02 15:38:55 +08:00
clowwindy 536b7d1ee6 use SIGINT instead in tests
Conflicts:
	tests/test.py
2014-12-22 17:25:39 +08:00
clowwindy 134497c24f implement daemon 2014-12-21 12:47:07 +08:00
clowwindy 710fe14190 rename test_cipher as it will break unit tests 2014-11-05 18:32:01 +08:00
clowwindy cbf8c6705b refactor table into a single cipher plugin 2014-11-05 18:27:18 +08:00
clowwindy 2a53b67c65 python 3 support; not stable yet 2014-10-31 18:28:22 +08:00
clowwindy 0814888ba5 use absolute import 2014-10-31 16:29:19 +08:00
clowwindy f677c8152d close #185 2014-09-20 19:11:33 +08:00
clowwindy 2a61e80071 only output exception in verbose mode 2014-09-12 23:06:18 +08:00
clowwindy ea70a5bd79 exit 1 on error; #179 2014-09-12 22:20:33 +08:00
clowwindy fdb3a36170 implement graceful shutdown in sslocal; close #179 2014-09-12 20:47:04 +08:00
clowwindy 71c3759c12 add async dns 2014-06-08 15:58:59 +08:00
clowwindy 0c8a8ef23f refine loop 2014-06-01 19:09:52 +08:00
clowwindy 5e19fdc66b refine exiting 2014-06-01 17:56:41 +08:00
clowwindy f49d086d6a add event names 2014-06-01 17:17:50 +08:00
clowwindy 3cefe374c2 socket.SO_REUSEADDR 2014-06-01 14:53:06 +08:00
clowwindy 5e9a9c9beb almost done 2014-06-01 14:20:40 +08:00
clowwindy 47fd479d6e almost done 2014-06-01 14:10:18 +08:00
clowwindy a30e53ee65 add timeout in local 2014-05-24 21:29:40 +08:00
clowwindy 6e5a753d41 add timeout in TCP server 2014-05-22 12:01:13 +08:00
clowwindy 6caeabd03d fix a potential RST problem 2014-05-10 01:22:26 +08:00
clowwindy 33f7ad9e8f fix EINPROGESS 2014-05-03 08:41:56 +08:00
clowwindy e0a27f1df3 lint server 2014-05-02 12:47:56 +08:00
clowwindy 89a7508f26 lint code 2014-05-02 12:28:53 +08:00
clowwindy 2a172bea6a fast open 2014-05-01 15:07:45 +08:00
clowwindy 0b9ff0557f fastopen 2014-05-01 13:43:00 +08:00
clowwindy 355307e5ef add nodelay 2014-05-01 11:44:36 +08:00
clowwindy 6dae7d231e fix local 2014-04-24 15:24:43 +08:00
clowwindy 7e70fe290a fix local 2014-04-24 15:07:18 +08:00
clowwindy c9ffb895c3 lint code 2014-04-23 16:36:27 +08:00
clowwindy d940951b93 add udprelay 2014-04-23 16:31:17 +08:00
clowwindy ea663145e2 add help 2014-04-07 17:03:35 +08:00
clowwindy 9b3f608a62 better error message with wrong password 2014-02-17 13:30:04 +08:00
clowwindy 34843c6a91 better error message with config.json format 2014-02-17 13:27:34 +08:00
v3aqb a5019f38dd support server multi password, support client multi server 2013-11-17 09:39:51 +08:00
v3aqb ac5901ca20 fix bug when no config file exists 2013-10-14 20:14:59 +08:00
clowwindy 29c4fd7de9 listen at server; show warnings 2013-07-04 23:16:10 +08:00
clowwindy 825747c530 better error message 2013-06-22 17:56:30 +08:00
clowwindy edec422aef fix test 2013-06-22 17:34:59 +08:00
clowwindy 794ff240a6 move to pypi 2013-06-22 17:30:31 +08:00