├── .gitignore ├── .travis.yml ├── Cargo.lock ├── Cargo.toml ├── README.md ├── asocks5 ├── Cargo.toml ├── README.md ├── examples │ ├── client.rs │ └── server.rs └── src │ ├── client │ ├── mod.rs │ └── udp.rs │ ├── codec │ ├── address.rs │ └── mod.rs │ ├── consts.rs │ ├── heads │ ├── command.rs │ ├── handshake.rs │ └── mod.rs │ ├── lib.rs │ ├── listen.rs │ └── socks.rs ├── ci └── before_deploy.sh ├── src ├── cmd_options.rs ├── conf │ ├── decision_tree │ │ ├── mod.rs │ │ └── text.rs │ ├── main │ │ ├── dns.rs │ │ ├── mod.rs │ │ ├── parse.rs │ │ ├── relay.rs │ │ └── util.rs │ ├── mod.rs │ ├── prefix_match │ │ ├── domain_name.rs │ │ ├── ip_addr.rs │ │ ├── mod.rs │ │ └── util.rs │ └── util.rs ├── lib.rs ├── main.rs ├── relay │ ├── forwarding │ │ ├── mod.rs │ │ └── tcp │ │ │ ├── copy │ │ │ └── mod.rs │ │ │ └── mod.rs │ ├── inspect │ │ ├── codec.rs │ │ ├── mod.rs │ │ └── parse │ │ │ ├── mod.rs │ │ │ └── tls │ │ │ ├── mod.rs │ │ │ └── sni.rs │ ├── listen │ │ ├── mod.rs │ │ └── socks.rs │ ├── mod.rs │ └── route │ │ └── mod.rs ├── resolver │ ├── client │ │ ├── mod.rs │ │ ├── socks │ │ │ └── mod.rs │ │ └── udp.rs │ ├── dnsclient.rs │ ├── handler.rs │ ├── lookup.rs │ ├── mod.rs │ └── serve │ │ └── mod.rs └── util │ ├── fmt.rs │ └── mod.rs └── test └── conf.d ├── addrzone-expectation ├── addrzone ├── cs │ ├── fp │ └── uccu └── uccu ├── namezone-expectation └── namezone ├── alliance ├── other └── uccu ├── chemistry └── uccu /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | **/*.rs.bk 3 | config 4 | net2-rs 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/.travis.yml -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/Cargo.lock -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/Cargo.toml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/README.md -------------------------------------------------------------------------------- /asocks5/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/Cargo.toml -------------------------------------------------------------------------------- /asocks5/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/README.md -------------------------------------------------------------------------------- /asocks5/examples/client.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/examples/client.rs -------------------------------------------------------------------------------- /asocks5/examples/server.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/examples/server.rs -------------------------------------------------------------------------------- /asocks5/src/client/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/src/client/mod.rs -------------------------------------------------------------------------------- /asocks5/src/client/udp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/src/client/udp.rs -------------------------------------------------------------------------------- /asocks5/src/codec/address.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/src/codec/address.rs -------------------------------------------------------------------------------- /asocks5/src/codec/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/src/codec/mod.rs -------------------------------------------------------------------------------- /asocks5/src/consts.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/src/consts.rs -------------------------------------------------------------------------------- /asocks5/src/heads/command.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/src/heads/command.rs -------------------------------------------------------------------------------- /asocks5/src/heads/handshake.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/src/heads/handshake.rs -------------------------------------------------------------------------------- /asocks5/src/heads/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/src/heads/mod.rs -------------------------------------------------------------------------------- /asocks5/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/src/lib.rs -------------------------------------------------------------------------------- /asocks5/src/listen.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/src/listen.rs -------------------------------------------------------------------------------- /asocks5/src/socks.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/asocks5/src/socks.rs -------------------------------------------------------------------------------- /ci/before_deploy.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/ci/before_deploy.sh -------------------------------------------------------------------------------- /src/cmd_options.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/cmd_options.rs -------------------------------------------------------------------------------- /src/conf/decision_tree/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/decision_tree/mod.rs -------------------------------------------------------------------------------- /src/conf/decision_tree/text.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/decision_tree/text.rs -------------------------------------------------------------------------------- /src/conf/main/dns.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/main/dns.rs -------------------------------------------------------------------------------- /src/conf/main/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/main/mod.rs -------------------------------------------------------------------------------- /src/conf/main/parse.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/main/parse.rs -------------------------------------------------------------------------------- /src/conf/main/relay.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/main/relay.rs -------------------------------------------------------------------------------- /src/conf/main/util.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/main/util.rs -------------------------------------------------------------------------------- /src/conf/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/mod.rs -------------------------------------------------------------------------------- /src/conf/prefix_match/domain_name.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/prefix_match/domain_name.rs -------------------------------------------------------------------------------- /src/conf/prefix_match/ip_addr.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/prefix_match/ip_addr.rs -------------------------------------------------------------------------------- /src/conf/prefix_match/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/prefix_match/mod.rs -------------------------------------------------------------------------------- /src/conf/prefix_match/util.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/prefix_match/util.rs -------------------------------------------------------------------------------- /src/conf/util.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/conf/util.rs -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/lib.rs -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/main.rs -------------------------------------------------------------------------------- /src/relay/forwarding/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/forwarding/mod.rs -------------------------------------------------------------------------------- /src/relay/forwarding/tcp/copy/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/forwarding/tcp/copy/mod.rs -------------------------------------------------------------------------------- /src/relay/forwarding/tcp/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/forwarding/tcp/mod.rs -------------------------------------------------------------------------------- /src/relay/inspect/codec.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/inspect/codec.rs -------------------------------------------------------------------------------- /src/relay/inspect/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/inspect/mod.rs -------------------------------------------------------------------------------- /src/relay/inspect/parse/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/inspect/parse/mod.rs -------------------------------------------------------------------------------- /src/relay/inspect/parse/tls/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/inspect/parse/tls/mod.rs -------------------------------------------------------------------------------- /src/relay/inspect/parse/tls/sni.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/inspect/parse/tls/sni.rs -------------------------------------------------------------------------------- /src/relay/listen/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/listen/mod.rs -------------------------------------------------------------------------------- /src/relay/listen/socks.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/listen/socks.rs -------------------------------------------------------------------------------- /src/relay/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/mod.rs -------------------------------------------------------------------------------- /src/relay/route/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/relay/route/mod.rs -------------------------------------------------------------------------------- /src/resolver/client/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/resolver/client/mod.rs -------------------------------------------------------------------------------- /src/resolver/client/socks/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/resolver/client/socks/mod.rs -------------------------------------------------------------------------------- /src/resolver/client/udp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/resolver/client/udp.rs -------------------------------------------------------------------------------- /src/resolver/dnsclient.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/resolver/dnsclient.rs -------------------------------------------------------------------------------- /src/resolver/handler.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/resolver/handler.rs -------------------------------------------------------------------------------- /src/resolver/lookup.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/resolver/lookup.rs -------------------------------------------------------------------------------- /src/resolver/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/resolver/mod.rs -------------------------------------------------------------------------------- /src/resolver/serve/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/resolver/serve/mod.rs -------------------------------------------------------------------------------- /src/util/fmt.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/src/util/fmt.rs -------------------------------------------------------------------------------- /src/util/mod.rs: -------------------------------------------------------------------------------- 1 | mod fmt; 2 | 3 | pub use self::fmt::BsDisp; 4 | -------------------------------------------------------------------------------- /test/conf.d/addrzone-expectation: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/test/conf.d/addrzone-expectation -------------------------------------------------------------------------------- /test/conf.d/addrzone/cs/fp: -------------------------------------------------------------------------------- 1 | 192.168.23.253 2 | 1:2:3:4:5:8::7 3 | -------------------------------------------------------------------------------- /test/conf.d/addrzone/cs/uccu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/test/conf.d/addrzone/cs/uccu -------------------------------------------------------------------------------- /test/conf.d/addrzone/uccu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/test/conf.d/addrzone/uccu -------------------------------------------------------------------------------- /test/conf.d/namezone-expectation: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/test/conf.d/namezone-expectation -------------------------------------------------------------------------------- /test/conf.d/namezone/alliance/other: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/test/conf.d/namezone/alliance/other -------------------------------------------------------------------------------- /test/conf.d/namezone/alliance/uccu: -------------------------------------------------------------------------------- 1 | com.example.uccu.cs 2 | -------------------------------------------------------------------------------- /test/conf.d/namezone/chemistry: -------------------------------------------------------------------------------- 1 | edu.example.uccu.chem # comment 2 | -------------------------------------------------------------------------------- /test/conf.d/namezone/uccu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/net-reflow/reflow/HEAD/test/conf.d/namezone/uccu --------------------------------------------------------------------------------