52 Commits

Author SHA1 Message Date
Haruue Icymoon
4cd18e6685
feat: add quic_settings into client config
fix: #420

allow user to disable auto reconnect when quic disconnected, along with
quic handshake & idle timeout.

an extra failed request would be required to make the client exit in
case of quic disconnected, but i don't think this would be a problem in
the common usage.
2022-08-31 16:34:51 +08:00
Haruue Icymoon
2fb70bdb58
feat: log http proxy error
goproxy actually discard all upstream errors, you can find its error
handling here [1], the upstream error from proxy.connectDial() is always
hidden in the two if branches, and never got logged. we need to log
hysteria layer errors by ourselves.

[1] 8ea89ba920/https.go (L321-L328)

according to some bug reports (such like #404 and the resolve_preference
one report via telegram private message), some users use http proxy, got a
http 502 error without any useful logs.
2022-08-25 00:42:36 +08:00
Toby
8960aefca3 chore: update module names (hysteria & quic-go fork) 2022-08-20 11:44:12 -07:00
Toby
1462cadfdc format: gofumpt 2022-08-13 11:04:28 -07:00
Toby
fbfd933fac feat: ip mask for client side 2022-08-11 21:25:47 -07:00
Haruue Icymoon
0ba4c36bc6
Merge remote-tracking branch 'origin/master' into wip-newtun-license 2022-08-10 18:05:45 +08:00
Haruue Icymoon
720b97da67
chore: solve license conflict against tun2socks 2022-08-10 12:24:06 +08:00
Toby
a4c61e285e chore: minor log format change 2022-08-09 20:23:22 -07:00
Haruue Icymoon
f3f604b59a
refactor(tun): switch to xjasonlyu/tun2socks
fix: #306, #394, #185, #161

break changes:

we won't create or maintain the interface now, so it is user's duty to
create the tun interface, for example, with command like
  ip tuntap add dev hytun mode tun
(or maybe we can use songgao/water to keep this behavior unchanged).

correspondingly, the "address", "gateway", "mask", "dns", "persist"
options in the "tun" config have been removed.

in addition, please note xjasonlyu/tun2socks is licensed under GPLv3 and
hysteria is licensed under MIT, I don't ensure is it legal to use it as
a go mod, but there are too many requests related on it so whatever...
2022-08-10 02:43:07 +08:00
Toby
3f0953ffdd feat: rework resolver support 2022-08-06 19:58:05 -07:00
Toby
4a3e996c9a feat: update quic-go 2022-07-06 14:18:52 -07:00
Toby
575de280ff feat: TCP redirect implementation 2022-06-06 18:09:34 -07:00
Toby
56825c5525 fix tun timeout check 2022-04-30 12:00:13 -07:00
Toby
53c61ac0f4 feat: new string-based speed (up/down) options 2022-04-03 20:26:25 -07:00
Toby
f98eec69f2 feat: resolve preference 2022-03-27 15:10:16 -07:00
Toby
7466b69cce feat: re-enable PMTUD on Windows & Linux 2022-02-19 23:21:13 -08:00
Toby
d6b549cea4 fix: incorrect TProxy UDP implementation (228) 2022-02-19 17:42:02 -08:00
mritd
fd2e0100c6
feat(cmd): use cobra
use cobra

Signed-off-by: mritd <mritd@linux.com>
2022-02-06 15:33:15 +08:00
Toby
0bb74fcd8d feat: client retry 2022-02-03 21:37:25 -08:00
Toby
b593df44b7 feat: disable quic-go PMTUD due to broken implementation 2022-02-03 20:37:08 -08:00
Toby
841810d6ca feat: transport refactorization 2022-01-23 17:00:02 -08:00
Toby
89452dd9c5 feat: ACL country support 2022-01-09 18:11:52 -08:00
Toby
1c06b66cdc feat: transport & obfs refactoring 2021-12-27 18:07:01 -08:00
Toby
ccbd959007 chore: setResolver 2021-12-16 14:06:13 -08:00
Toby
c09edb6e53 feat: custom resolver 2021-12-15 21:32:26 -08:00
Toby
4872004a5c feat: experimental faketcp implementation 2021-12-15 16:46:20 -08:00
Toby
2c4bd83ae1 chore: code improvements 2021-12-08 02:02:55 -08:00
charles
cca314a938 support multiple tcp and udp relays 2021-12-05 19:12:37 +08:00
Toby
4140927003 feat: customizable ALPN 2021-11-24 23:35:37 -08:00
Toby
6eb49eef12 feat: remove ACL from TPROXY & TUN 2021-11-24 23:04:34 -08:00
Toby
32b3dc65a0 Add an option to disable MTU discovery 2021-08-23 14:38:10 -07:00
Toby
078f860174
Merge pull request #75 from HyNetwork/wip-tun
TUN
2021-05-08 18:09:53 -07:00
Toby
2934f376d1 Add TLS server name option for client 2021-05-08 16:39:25 -07:00
Haruue Icymoon
68d8cd4043
Fix TCP timeout not works in TUN server 2021-05-03 15:43:45 +08:00
Haruue Icymoon
abfacebd40
Fix acl engine not set in TUN server 2021-05-03 11:22:46 +08:00
Haruue Icymoon
284efce6db
Set default timeout to 300s for TUN 2021-05-03 11:22:46 +08:00
Haruue Icymoon
81128a7626
ACL for TUN 2021-05-03 11:22:46 +08:00
Haruue Icymoon
13ec19cbfe
Implement TUN, no ACL support yet 2021-05-03 11:22:43 +08:00
Toby
3955d98aa2 Better default params to reduce flow control blocks & add README for optimizing for extreme transfer speeds 2021-04-30 21:29:18 -07:00
Toby
3667778ca7 Fix import cycles 2021-04-27 20:18:43 -07:00
Toby
5ac95d987a Use core.Transport 2021-04-27 20:14:43 -07:00
Toby
7b3e1a5b41 UDP TProxy implementation, no ACL support yet 2021-04-25 00:38:07 -07:00
Toby
70fd2ffc0d ACL for TCP TProxy 2021-04-24 15:36:19 -07:00
Toby
787ed14c4d TCP TProxy implementation, no UDP or ACL support yet 2021-04-24 02:56:17 -07:00
Toby
bca98ef4da Implement UDP relay 2021-04-21 21:40:43 -07:00
Toby
d8b198ca31 Rename the original relay to TCPRelay 2021-04-21 16:38:08 -07:00
Toby
b80db1fc19 XPlus obfs & don't frag 2021-04-19 20:52:50 -07:00
Toby
8530211287 Implement SOCKS5 UDP (ACL not yet integrated) 2021-03-27 18:50:12 -07:00
Toby
4bb5982960 Implemented UDP for both server & client 2021-03-27 16:51:15 -07:00
Toby
01c7d18211 Update to support quic-go v0.20.0 APIs 2021-03-21 15:08:48 -07:00