Commit graph

226 commits

Author SHA1 Message Date
Toby
c392b0338b chore(deps): bump golang.org/x/net from 0.21.0 to 0.24.0 2024-04-19 14:42:06 -07:00
Toby
dc1f58414a chore: improve comments 2024-04-15 14:58:09 -07:00
Haruue
9752347073
fix: check if cert-key is loadable on server start
close: #1040
2024-04-15 19:31:23 +08:00
Toby
234dc4508b
Merge pull request #1016 from xchacha20-poly1305/dev-android-protect
feat: support Android protect path
2024-04-12 23:32:38 -07:00
Toby
e1d8901c16 chore: adjust import format 2024-04-12 10:49:56 -07:00
Haruue
8e886b6e05
test(proxymux): reduce wait in the tests 2024-04-12 14:55:17 +08:00
Haruue
044620a5db
chore(proxymux): make subListener dereg immediate
Now you can call ListenHTTP() again immediately after previous closed.
2024-04-12 14:47:12 +08:00
Haruue
6d9c4fd4e5
test(proxymux): add unit test 2024-04-11 23:21:32 +08:00
Haruue
8d9b10a259
fix(proxymux): close of closed channel
when call listener.Close() twice
2024-04-11 23:07:44 +08:00
Haruue
34574e0339
refactor: proxymux
This commit rewrites proxymux package to provide following functions:

+ proxymux.ListenSOCKS(address string)
+ proxymux.ListenHTTP(address string)

both are drop-in replacements for net.Listen("tcp", address)

The above functions can be called with the same address to take
advantage of the mux feature.

Tests are not included, but we will have them very soon.

This commit should be in PR #1006, but I ended up with it in a separate
branch here. Please rebase if you want to merge it.
2024-04-11 21:16:17 +08:00
Toby
6b5486fc09 feat: add test for sockopts config fields 2024-04-05 16:15:29 -07:00
Haruue
e6da1f348c
fix(sockopts): error handling in applyToUDPConn
it is just no reason to use named err retval here
2024-04-05 13:20:17 +08:00
Haruue
5bebfd5732
fix(sockopts): error handling in applyToUDPConn 2024-04-05 13:17:21 +08:00
HystericalDragon
297d64e48f
chore: format code 2024-04-05 11:26:22 +08:00
Haruue
e1d7ce4640
chore: a better fix for 32-bit unix.Timeval
Why there is no decltype() in Golang?

At least we got generics now.

ref: 9520d84094
2024-04-05 10:49:03 +08:00
HystericalDragon
9520d84094
fix: timeval in different arch
Signed-off-by: HystericalDragon <HystericalDragons@proton.me>
2024-04-05 09:57:45 +08:00
HystericalDragon
13586df2ba
fix: invalid const usage
Signed-off-by: HystericalDragon <HystericalDragons@proton.me>
2024-04-05 08:36:04 +08:00
Haruue
65f5e9caa5
chore: go mod tidy 2024-04-05 02:30:52 +08:00
Haruue
3e34da1aa8
refactor: protect => quic.sockopts
Android's VpnService.protect() itself is confusing, so we rename the
"protect" feature with the name `fdControlUnixSocket` and make it a
sub-option under `quic.sockopts`.

A unit test is added to make sure the protect feature works.

I also added two other common options to `quic.sockopts` that I copied
from my other projects but did not fully test here.
2024-04-05 02:20:45 +08:00
HystericalDragon
03c8b5e6b9
feat: support Android protect path
about: 1ac9d4956b

Signed-off-by: HystericalDragon <HystericalDragons@proton.me>
2024-04-03 18:09:40 +08:00
Haruue
d34ff757c3
chore: dos2unix client_test.yaml
NOTE: squash this commit with previous one before merge
2024-03-25 11:06:09 +08:00
xmapst
de7d7dc51e 增强: HTTP/SOCKS5混合端口 2024-03-25 10:17:08 +08:00
xmapst
02fa2cde0a 增强: HTTP/SOCKS5混合端口 2024-03-25 10:15:11 +08:00
Toby
7aa0becd84 feat: quic-go v0.42.0 2024-03-23 15:05:10 -07:00
Toby
a037880f88
Merge pull request #998 from HynoR/master
degrade the log level adjustment for tcpError and udpError
2024-03-23 10:59:07 -07:00
Toby
2d7d67bf27 feat: also change client side errors to warns 2024-03-23 10:58:11 -07:00
Haruue
9dfb5808e0
chore(deps): bump sing-tun from v0.2.4 to v0.2.5 2024-03-23 21:13:09 +08:00
HynoR
ddb5b511fc Optimize the log level adjustment for tcpError and udpError by shifting from error to warning. 2024-03-23 14:19:50 +08:00
Toby
bdd4114654
Merge pull request #996 from apernet/wip-hy2-tun
Add TUN inbound for client
2024-03-22 22:40:51 -07:00
Haruue
6374ea11c4
feat(tun): allow omit pfxlen in full len pfx route 2024-03-23 11:13:43 +08:00
Toby
aab104ae2e feat: update config test 2024-03-22 16:20:03 -07:00
Toby
dc8fe45a1a chore: adjust imports 2024-03-22 15:50:58 -07:00
Toby
87bbf17bc5 chore: go mod tidy 2024-03-22 13:32:24 -07:00
Haruue
b287020daa
chore(tun): show error on unsupported platform 2024-03-20 22:09:03 +08:00
Haruue
2e93c12cdc
feat(tun): export sing-tun auto route config 2024-03-20 13:45:12 +08:00
Haruue
91406ab0f9
chore(tun): use /126 length in default prefix6 2024-03-19 20:35:42 +08:00
Haruue
92ed8f5e6a
chore(tun): enable ForwarderBindInterface 2024-03-19 19:38:43 +08:00
Haruue
38d9248acd
rm(tun): debug.PrintStack() in logger 2024-03-19 16:56:26 +08:00
Haruue
0cde4f405f
feat(tun): use time.Duration for timeout config
matches timeout config of other inbounds
2024-03-19 15:49:36 +08:00
Haruue
4aec8166b3
chore: switch to apernet sing-tun fork 2024-03-19 15:15:54 +08:00
Haruue
f10805dc13
init: tun support with sing-tun 2024-03-19 02:13:50 +08:00
Toby
804e3f6df9
Merge pull request #987 from mritd/master
feat(acme): support acme listen host
2024-03-17 13:09:52 -07:00
kovacs
57e6e47f19
feat(acme): support acme listen host
support acme listen host

ref #978

Signed-off-by: kovacs <mritd@linux.com>
2024-03-14 11:01:36 +08:00
Toby
1f05791a4e chore(deps): bump google.golang.org/protobuf from 1.28.1 to 1.33.0 2024-03-13 19:36:32 -07:00
Toby
e99ac076da chore: "server may not support speed test" hint when it's a dial error 2024-03-09 21:25:49 -08:00
Toby
a0bd58063b feat: built-in speed test client & server 2024-03-09 20:38:30 -08:00
Toby
0c2b0234fa fix: FreeBSD IPv4-mapped IPv6 listening addr fix 2024-02-29 16:38:42 -08:00
Haruue
1ac9d4956b
feat: allow set ListenUDP impl for udphop conn
Third-party clients can use this to set options on created sockets.
e.g. calling VpnService.protect() on Android.
2024-02-27 21:05:53 +08:00
Haruue Icymoon
842b0ab3f7
feat: load previous download when download fail 2024-02-22 01:41:08 +08:00
Haruue Icymoon
6dea0adb19
feat: re-download geo db when autoDL && load fail 2024-02-21 17:25:42 +08:00