Commit graph

18 commits

Author SHA1 Message Date
ssrlive
bbb8d3b244
port to windows or macos (#61) 2023-08-31 14:31:02 +08:00
ssrlive
ff9c258fbd re-formatting with max_width = 120 2023-08-08 23:45:16 +08:00
ssrlive
5bb4bbf022 remove raw dns parse code 2023-08-06 21:36:00 +08:00
ssrlive
30d7217374 refine VirtualDns 2023-08-06 18:31:49 +08:00
ssrlive
5ce2e85919 trust-dns-proto import 2023-08-06 12:22:58 +08:00
ssrlive
c61b6c74cd swith socks5-impl 2023-07-24 20:48:56 +02:00
B. Blechschmidt
bfface515d Only log the DNS A query 2023-03-25 22:25:57 +01:00
B. Blechschmidt
33892e28dc Improve code elegance in DNS cache removal function 2023-03-25 22:23:46 +01:00
B. Blechschmidt
a5aac8c0a4 Merge SOCKS4 support
The SOCKS4 tests in the CI pipeline will currently fail, as no SOCKS4
test server for automated testing has been set up yet.
2023-03-25 01:53:30 +01:00
B. Blechschmidt
341bab5586 Implement SOCKS4 2023-03-25 01:39:46 +01:00
B. Blechschmidt
5930b9b3b1 Merge improved error handling from ssrlive 2023-03-24 15:31:05 +01:00
B. Blechschmidt
83846fe631 Make virtual DNS more robust 2023-03-24 13:43:44 +01:00
B. Blechschmidt
3c8005e6b7 Use LRU cache for virtual DNS
This commit introduces an LRU cache for virtual DNS and fixes a bug
where the virtual DNS feature would cause connection mappings to time
out.
2023-03-24 13:26:31 +01:00
ssrlive
1d1e50c36a remove lots of unwrap() 2023-03-24 14:31:22 +08:00
B. Blechschmidt
6b7f550e7a Enable virtual DNS by default for the CLI.
This commit enables virtual DNS by default for the CLI.

Pros for this decision:
  - It works out of the box in most cases.
  - Users do not need to install third-party software.
  - Users do not need to update their /etc/resolv.conf.

Cons:
  - Not every server might support this.
  - Hijacking port 53 without asking is somewhat intrusive.

Also, make the --dns argument an enum type. In the future, native
support for DNS over TCP/TLS might be added. In that case we could e.g.
supply tcp://1.1.1.1 to the --dns argument without breaking the CLI.
2023-03-23 22:13:35 +01:00
B. Blechschmidt
7695ba9c39 Increase DNS implementation robustness 2023-03-23 21:38:17 +01:00
B. Blechschmidt
4260e28a52 Improve code style 2023-03-23 13:24:33 +01:00
B. Blechschmidt
c9297124e1 Implement first, unfinished version of DNS support and fix incomplete TCP stream bug
This commit does two things:
First, it implements a first, unfinished version of the virtual DNS
functionality. This feature is incomplete and has known bugs. Since it
needs to be enabled manually, this is not a huge issue so far.
Second, the commit fixes a bug where TCP streams where not properly
relayed, causing TCP connections to stall.
2023-03-23 13:03:01 +01:00