Commit Graph

80 Commits

Author SHA1 Message Date
mo
f77e659826 add user handle
revive inspect
2020-04-22 10:15:40 +08:00
mo
8b383556a2 fix readme 2020-04-21 22:39:11 +08:00
mo
6a3abb43a4 fix userIP --> userAddr like host:port 2020-04-21 22:31:04 +08:00
mo
acba51a242 add valid check add userIP 2020-04-21 22:28:34 +08:00
mo
881ed95bb4 move rule allow 2020-04-21 20:27:02 +08:00
mo
f4dcbed85b fix const defined 2020-04-21 14:03:20 +08:00
mo
859fb531b1 fix go mod require 2020-04-21 08:32:52 +08:00
mo
027a91ba72 fix example
fix option  bug
2020-04-20 21:29:50 +08:00
mo
180335f4f1 fix bindIP but it not used 2020-04-20 21:27:12 +08:00
mo
1daccf05c2 use options 2020-04-20 21:17:38 +08:00
mo
5518983a28 Support for the ASSOCIATE command 2020-04-20 20:41:58 +08:00
mo
c3129f323d add standard proxy test 2020-04-20 19:56:35 +08:00
mo
66fbc0399a fix head
fix socks5 test
fix request
2020-04-20 17:09:16 +08:00
mo
a87d46fbf5 add goroutine pool interface 2020-04-20 16:52:29 +08:00
mo
dd678cfead move parse header 2020-04-20 16:42:10 +08:00
mo
be8e44e47d implement raw udp 2020-04-20 16:19:51 +08:00
mo
32060b0332 fix head bug
add udp experimental handle
2020-04-20 12:39:01 +08:00
mo
d6f69bb3ef fix socks test pool bug
add pool test
2020-04-20 09:50:49 +08:00
mo
9101cefe62 add buffer pool 2020-04-20 09:41:06 +08:00
mo
74d001ca91 fix send reply 2020-04-20 09:21:29 +08:00
mo
1f84f6f4f6 use %v replace %w ,%w only support 1.14+ 2020-04-19 23:51:13 +08:00
mo
587b9a3da1 fix bug and add head to request 2020-04-19 23:40:14 +08:00
mo
93c488961d fix err format
delete dead code
2020-04-19 22:30:45 +08:00
mo
771f7fdc70 fix parse protocol 2020-04-19 21:55:14 +08:00
mo
fef547fd67 add head file 2020-04-19 21:37:05 +08:00
mo
f87199c59e Fix panic when target.LocalAddr() is not *net.TCPAddr
This happens when you use custom dialer that returns custom net.Conn
that returns a non-*net.TCPAddr net.Addr for LocalAddr() calls.

For example, if you dial through an SSH connection,
it might be difficult to figure out remote local address,
so you return a stub instead.
2020-04-19 17:57:30 +08:00
mo
d86385b825 use logger interface 2020-04-19 17:47:39 +08:00
mo
5c0531b64d add original reference 2020-04-19 17:13:57 +08:00
mo
f9d8b24022 fix readme 2020-04-19 17:11:00 +08:00
mo
b4107cb925 add go mod
use standard packet context
2020-04-19 17:08:22 +08:00
Armon Dadgar
e75332964e Merge pull request #14 from stbuehler/feature-without-resolve
support not resolving FQDN
2016-09-02 11:42:37 -07:00
Armon Dadgar
770e040d1c Merge pull request #13 from stbuehler/feature-half-close-interface
half-close all connections supporting `CloseWrite() error`
2016-09-02 11:38:53 -07:00
Stefan Bühler
d948001d94 support not resolving FQDN
Although one can put the FQDN into the context and retrieve it later, this
makes it more straightforward.

Usecase: forwarding to another (SOCKS-)proxy, filtering/routing based on FQDN.
2016-08-14 12:22:40 +02:00
Stefan Bühler
836d3b2bda half-close all connections supporting CloseWrite() error
Usecase: support TCP and UNIX connections, support "wrapped" connections (peek
first bytes to support multiple protocols on one listening socket).
2016-08-14 12:15:52 +02:00
Armon Dadgar
b34cad17d2 Merge pull request #11 from cybozu-go/master
golang.org/x/net/context support
2016-03-20 16:33:43 -07:00
ymmt2005
385bbe4759 Add golang.org/x/net/context support.
Read http://blog.golang.org/context for its benefits.

This PR has not utilized contexts yet; just passing them
to every customization points to help them add/retrieve
request context values.
2016-03-08 23:29:11 +09:00
Armon Dadgar
3a873e99f5 Merge pull request #9 from ymmt2005/master
Let proxy pass down EOF (FIN) to the other end.
2016-02-26 11:28:52 -05:00
ymmt2005
66ca0497df Let proxy pass down EOF (FIN) to the other end.
This PR improves proxy() implementation so that it passes down EOF
(i.e. TCP FIN) from the read end to the write end by using
TCPConn.CloseWrite().  This is a must for TCP proxy as TCP sockets
can be half-closed.

Moreover, Server.handleConnect() should wait for two acks from
errCh to guarantee that the communication is completely over.
This is also fixed.

Lastly, noisy debug log is removed.
2016-02-23 20:35:36 +09:00
Armon Dadgar
8a8737ba34 Merge pull request #8 from getlantern/master
Made dialer configurable
2016-02-05 17:12:22 -08:00
Ox Cart
d251d351c1 Cleaned up address construction 2016-02-05 06:51:42 -06:00
Ox Cart
0126026885 Made dialer configurable 2016-02-04 13:25:27 -06:00
Armon Dadgar
b7e3cc6811 Merge pull request #6 from ap4y/request_struct
Auth based rewrites and rulesets
2016-01-18 14:18:52 -08:00
ap4y
eb24bec29f Use new Request struct for the Server api 2016-01-11 21:24:54 +13:00
ap4y
ae345732fa Refactor handleRequest using new Request struct 2016-01-11 21:01:29 +13:00
ap4y
353e906a7b Introduce AuthContext struct and refactor auth api using it 2016-01-11 20:52:06 +13:00
ap4y
aad92b1d46 Refactor RuleSet api using Request struct 2016-01-11 20:37:41 +13:00
ap4y
1fcd99d996 Use Request struct in rewrite interface 2016-01-11 20:29:20 +13:00
ap4y
8a2ebe32dc Introduce Request struct
Encapsulates state of the incoming request
2016-01-11 20:21:34 +13:00
Armon Dadgar
00354d696e Merge pull request #5 from svent/add-logger-to-config
Add configuration option for the log target
2015-09-11 11:46:39 -07:00
svent
05a64adbf8 Adjust tests to use the logger config option 2015-09-07 02:19:34 +02:00