67 Commits

Author SHA1 Message Date
Chen Yufei
5ae96633ac Fix cross compile for Windows because no SIGUSR1. 2015-06-07 21:52:24 +08:00
fzerorubigd
d2efdd56e3 support relaunching cow on SIGUSR1
fixes #322
2015-05-17 00:17:53 +04:30
fzerorubigd
f619c854a0 wait for unfinished jobs and close all accepts 2015-05-16 00:53:20 +04:30
Chen Yufei
e529cef05c Remove SIGHUP catch up. 2014-11-02 16:47:04 +08:00
Chen Yufei
a4fa2816b6 Refactor proxy selection. 2014-07-09 10:54:16 +08:00
Chen Yufei
0ef33fc5af Fix possible cross FS rename for stat. 2013-12-20 11:25:24 +08:00
Chen Yufei
cfc756f3cb Refactor proxy server representation. 2013-10-26 00:57:59 +08:00
Chen Yufei
8639ef67a0 Small refactor for config parsing. 2013-10-07 00:02:11 +08:00
Yang Hong
013f0f6946 multiplex http parent connection
Search in site-specific connection pool, then in multiplex connections.
2013-09-16 09:40:59 +08:00
Chen Yufei
e0019e12f8 Small code tweak. 2013-09-06 00:01:20 +08:00
Markus Tzoe
f35036a3dd enable/disable estimateTimeout() 2013-09-05 23:00:39 +08:00
Chen Yufei
fe42ffe0dc Handle requests with no host in initial request line. 2013-08-20 00:19:41 +08:00
Chen Yufei
d18367891e Share server connection between clients. 2013-07-29 15:54:45 +08:00
Chen Yufei
76dbf0ed80 Collect client&server connection count, better debug message.
Some debug messages now contain "client: <remote addr>", we can group debug
message by client by grep and sorting on remote addr.
2013-07-28 13:46:45 +08:00
Chen Yufei
d3762b56ac Fix potential direct list assignment race in pac. 2013-06-14 14:14:01 +08:00
Chen Yufei
193b483da2 Support multiple sshServer options. 2013-06-05 19:46:07 +08:00
Chen Yufei
c5950fc332 Print all parent proxies in debug log. 2013-06-05 17:13:59 +08:00
Chen Yufei
8beed5ec47 Refactor parent proxy creation, support multiple socks/http parents. 2013-06-05 17:13:59 +08:00
Chen Yufei
bd992b74af Refactor parent proxy connector and fail cnt info. 2013-06-03 11:02:58 +08:00
Chen Yufei
1bf0affd81 Extract Fatal(f), reorder options in config.go 2013-04-13 09:47:43 +08:00
Chen Yufei
857443ca4e Also check command line option syntax. 2013-03-06 15:05:09 +08:00
Chen Yufei
314f7a74ec Use const bool to detect if running on Windows. 2013-02-20 22:35:15 +08:00
Chen Yufei
3c8043c243 Always load builtin and user specified list. 2013-02-19 19:12:35 +08:00
Chen Yufei
d471b772cb Allow user to specify proxy server address in PAC. 2013-02-11 20:38:56 +08:00
Chen Yufei
a9b07db0f1 Add httpParent option. Try parent connection in the order specified in config. 2013-02-07 13:56:13 +08:00
Chen Yufei
1bd2b74dab Workaround for windows to save site stat. 2013-02-05 22:03:17 +08:00
Chen Yufei
ebd82eb3ac PAC has to be generated to server different listen addresses.
Cache only direct list, while generate PAC on the fly.
2013-02-05 00:53:54 +08:00
Chen Yufei
5a2cdd909e Use site stat to generate pac file. 2013-02-04 14:12:11 +08:00
Chen Yufei
51f1ce0902 Change writeXXX in domainset.go to storeXXX. 2013-02-02 22:01:39 +08:00
Chen Yufei
854aaa9e8b Fix cpu profiling code. 2013-02-01 19:00:26 +08:00
Chen Yufei
a7270ea3f8 Periodically estimate timeout value by visiting www.baidu.com 2013-01-31 23:33:32 +08:00
Chen Yufei
0cc80aacf7 Sending back authenticate response to client. 2013-01-02 00:11:23 +08:00
Chen Yufei
25db7e3aaa Wait all listen addresses to finish before quit. 2013-01-01 11:30:00 +08:00
Chen Yufei
fe86197942 Support multiple listen address. 2012-12-31 23:39:54 +08:00
Chen Yufei
2539c3e512 Refactor domain set: new type DomainSet to hold all domain set. 2012-12-30 19:54:38 +08:00
Chen Yufei
d79c523f2f Fix printing version. 2012-12-23 22:11:28 +08:00
Chen Yufei
f9ebd4f9c8 Capture SIGHUP and write domain set. 2012-12-23 21:58:26 +08:00
Chen Yufei
f25c7aa8bc Remove global variable sigChan. 2012-12-20 00:05:37 +08:00
Chen Yufei
815ac9b613 Allow specify configuration file on command line.
Config now becomes a type, to make reflection possible, all fields are
exported now. So this commit touches almost all source files.
2012-12-17 16:55:52 +08:00
Chen Yufei
6018e8d771 Init log first to avoid crash printing error message. 2012-12-07 15:15:13 +08:00
Chen Yufei
d4314fe6dd shadowsocks support working. 2012-12-07 12:54:19 +08:00
Chen Yufei
ef70d80535 Add shadowsocks configuration and connection. 2012-12-07 12:29:34 +08:00
Chen Yufei
f1270a7976 Do not try socks connection if no socks server given. 2012-12-07 11:38:29 +08:00
Chen Yufei
f6c05c0fae Log message if no socks server specified. 2012-12-07 11:13:48 +08:00
Chen Yufei
5e793c1443 Correctly handle listen address with 0.0.0.0 as host.
Will try to get host IP address and serve it in PAC file.
2012-12-05 21:44:12 +08:00
Chen Yufei
14c1a392af Fix crash when printing inconsistency domain msg. 2012-12-03 21:05:26 +08:00
Chen Yufei
aebe94822a Disable buffering in log file. 2012-12-03 18:52:37 +08:00
Chen Yufei
8608740357 Refactor: printVer as config variable. 2012-11-27 09:34:59 +08:00
Chen Yufei
a8a281e25d Exit if no socks address specified. 2012-11-24 00:38:53 +08:00
Chen Yufei
87c1631dd8 Set self URL after parsing cmd line options. 2012-11-23 02:02:37 +08:00