Chen Yufei
|
5325d01407
|
Remove unused function copyNWithBuf.
|
2015-06-03 00:47:10 +08:00 |
|
Chen Yufei
|
f1fd6afbe1
|
Implement #328, allow specifying stat/blocked etc. in config file.
Also load stat/blocked/direct default from directory containing config file.
|
2015-06-03 00:41:34 +08:00 |
|
Chen Yufei
|
e23bd65631
|
Fix #302: use crc32 to hash hostname
This avoids biased proxy selection.
For comparison of crc32 and djb2 hash distribution, refer to:
https://github.com/cyfdecyf/hash-test
|
2015-05-11 23:54:36 +08:00 |
|
Chen Yufei
|
061554da5d
|
Fix crash with 0.0.0.0 listen address on windows.
|
2013-10-09 16:40:24 +08:00 |
|
Chen Yufei
|
fe42ffe0dc
|
Handle requests with no host in initial request line.
|
2013-08-20 00:19:41 +08:00 |
|
Chen Yufei
|
358e03c98c
|
Test for only continuation space when reading header lines.
Feedly uses headers start with $, so should not test for ascii letters.
|
2013-08-06 12:51:15 +08:00 |
|
Chen Yufei
|
862496fa12
|
Refactor sendBody.
|
2013-08-06 00:17:49 +08:00 |
|
Chen Yufei
|
ec2f656743
|
Add IsASCIILetter and TrimTrailingSpace.
|
2013-08-05 19:55:38 +08:00 |
|
Chen Yufei
|
ce43a930b5
|
Use bufio.Scanner, remove ReadLine(Slice).
|
2013-08-05 19:04:39 +08:00 |
|
Chen Yufei
|
d9d326d4a0
|
Remove unused hostIP().
|
2013-08-04 19:43:38 +08:00 |
|
Chen Yufei
|
b4e5370a84
|
Report precise error message to client.
|
2013-08-02 10:47:07 +08:00 |
|
Chen Yufei
|
a2f0814386
|
Remove splitHostPort, use net.SplitHostPort exclusively.
|
2013-07-19 12:37:50 +08:00 |
|
Chen Yufei
|
9c54c815d0
|
Ignore UTF-8 BOM in config file.
To avoid config parse error caused by stupid Windows text editors.
|
2013-07-12 23:18:16 +08:00 |
|
Chen Yufei
|
0f69e4db45
|
One pass to copy&convert upper/lower case for ascii.
|
2013-07-10 10:23:49 +08:00 |
|
Chen Yufei
|
f01a69d121
|
Add gov to top level domain list.
|
2013-06-19 10:33:18 +08:00 |
|
Chen Yufei
|
b80f89ae85
|
Specify go 1.1 in Travis, remove unnecessary return.
|
2013-06-13 22:27:14 +08:00 |
|
Chen Yufei
|
adf9541ad4
|
Always direct for loop back IP.
|
2013-06-07 15:12:43 +08:00 |
|
Chen Yufei
|
4696b72cf8
|
host2Domain return empty domain only for private IP.
|
2013-06-06 23:18:37 +08:00 |
|
Chen Yufei
|
289cc7cfe9
|
djb2 string hash function.
|
2013-04-14 13:51:15 +08:00 |
|
Chen Yufei
|
1bf0affd81
|
Extract Fatal(f), reorder options in config.go
|
2013-04-13 09:47:43 +08:00 |
|
Chen Yufei
|
8ce8ce602a
|
Util func: copyN with bufio.Reader as src.
|
2013-02-22 22:30:53 +08:00 |
|
Chen Yufei
|
5c2e9dac30
|
Rename copyN to copyNWithBuf, make dst as first parameter.
Parameter position switching is to keep consistency with the signature
of copy.
|
2013-02-22 22:30:53 +08:00 |
|
Chen Yufei
|
f386c15855
|
Rename ReadLineBytes to ReadLineSlice.
|
2013-02-21 20:12:28 +08:00 |
|
Chen Yufei
|
9e9dff4f2e
|
Simplify FieldsN.
|
2013-02-21 20:09:46 +08:00 |
|
Chen Yufei
|
ef5e37d035
|
New util function: FieldsN.
|
2013-02-21 16:50:21 +08:00 |
|
Chen Yufei
|
5ba2751c8e
|
Use 256 byte table for IsSpace.
|
2013-02-21 09:37:45 +08:00 |
|
Chen Yufei
|
49bb3177f5
|
Use customized bufio package to avoid copy in sendBocyChunked.
|
2013-02-20 22:36:27 +08:00 |
|
Chen Yufei
|
73659419d2
|
Use table to convert byte to int.
|
2013-02-20 22:36:26 +08:00 |
|
Chen Yufei
|
314f7a74ec
|
Use const bool to detect if running on Windows.
|
2013-02-20 22:35:15 +08:00 |
|
Chen Yufei
|
80a2f9efc5
|
Use ReadSlice in parseResponse.
|
2013-02-18 22:41:02 +08:00 |
|
Chen Yufei
|
4fd8ba3025
|
Use io.MultipleWriter to simplify send body function.
|
2013-02-18 17:05:50 +08:00 |
|
Chen Yufei
|
424335e101
|
Parse integer from bytes directly.
|
2013-02-18 00:00:32 +08:00 |
|
Chen Yufei
|
de3995fadb
|
TrimSpace utility function.
|
2013-02-06 22:10:44 +08:00 |
|
Chen Yufei
|
742ce9d521
|
Use ReadLineBytes in parseResponse.
|
2013-02-06 15:58:27 +08:00 |
|
Chen Yufei
|
546e628c8b
|
Switch back to using bufio.ReadLine for better performance.
|
2013-02-06 15:07:10 +08:00 |
|
Chen Yufei
|
fd9713dbe5
|
Customized impl of hostIsIP, also add in PAC.
|
2013-02-04 23:58:35 +08:00 |
|
Chen Yufei
|
3c0b632e48
|
Move host2Domain into util.
|
2013-02-03 23:57:42 +08:00 |
|
Chen Yufei
|
d956671406
|
Fix set timeout bug in copyClient2Server.
|
2013-02-01 21:43:56 +08:00 |
|
Chen Yufei
|
5e29031940
|
Comment about copyN.
|
2013-02-01 20:28:20 +08:00 |
|
Chen Yufei
|
bb3174f1f2
|
Test host name first in domainset test function. Use URL as argument.
So we can use host name in blocked/direct file.
|
2013-01-31 15:12:04 +08:00 |
|
Chen Yufei
|
ecedab9cad
|
Use bufio.ReadString to implement ReadLine without ending CR or LF.
|
2013-01-30 17:31:38 +08:00 |
|
Chen Yufei
|
4bf1b59e5a
|
Use getenv to get home directory.
So COW can be compiled and used with CGO disabled.
|
2013-01-30 15:03:03 +08:00 |
|
Chen Yufei
|
979f66018e
|
NewIPV4Mask function.
|
2013-01-28 23:09:17 +08:00 |
|
Chen Yufei
|
7a297eca98
|
Support digest authentication.
|
2013-01-09 20:56:34 +08:00 |
|
Chen Yufei
|
fe86197942
|
Support multiple listen address.
|
2012-12-31 23:39:54 +08:00 |
|
Chen Yufei
|
31e57f30ab
|
Move windows specific config into separate source file.
|
2012-12-18 20:26:03 +08:00 |
|
Chen Yufei
|
bb6b171832
|
Various fixes for configuration and domain list updating.
|
2012-12-18 19:32:41 +08:00 |
|
Chen Yufei
|
46b8ec20d5
|
Allow copyN to append prefix data.
This avoids small writes for chunk size.
|
2012-12-18 17:01:04 +08:00 |
|
Chen Yufei
|
72f8b6aac1
|
Fix typo: expandTild -> expandTilde
|
2012-12-18 16:59:41 +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 |
|