Shelikhoo
0cbb6d75f3
attempt fix of h2 dialer by discarding http client on failure
...
https://github.com/v2fly/v2ray-core/issues/1056#issuecomment-868321840
2021-06-25 10:56:42 +01:00
Loyalsoldier
d7a202a705
Lint: update linter config & fix code style ( #1089 )
...
* Lint: update linter config
* Fix: code style
2021-06-22 22:36:23 +08:00
Shelikhoo
d0d09dfa7f
apply coding style
2021-06-22 12:46:20 +01:00
Shelikhoo
861d6be19a
use detached context to fix #1059 #1059
...
It is important to use a detached context when creating shared transport connections that will outlive the initializing connection.
Otherwise, once the original initializing connection is cancelled, the transport connection will be cancelled as well.
This issue will be addressed in v5 by providing a transport session storage that also reduce the usage of globalDialerMap and other global variables.
2021-06-22 12:20:27 +01:00
Shelikhoo
e98865a205
amend certificate removal message
2021-06-04 20:07:27 +01:00
Bhoppi Chaw
6d9c463b60
Fix: new cert issuing is incorrectly delayed ( #998 )
...
* fix new cert issuing is incorrectly delayed
* apply lint
* revert cert duration & write cert issue/revoke info into log
* apply lint
Co-authored-by: Bhoppi Chaw <bhoppi#outlook,com>
2021-06-04 19:55:30 +01:00
Loyalsoldier
6f8979d017
Style: format code by gofumpt ( #1022 )
2021-05-20 05:28:52 +08:00
Loyalsoldier
cf009a4ba2
Fix lint ( #1021 )
2021-05-19 20:41:23 +08:00
Loyalsoldier
b57ebd5c1c
vFormat: use gci instead of customized goimports ( #1020 )
2021-05-19 19:59:46 +08:00
Shelikhoo
fb6e449572
apply coding style
2021-05-09 15:16:42 +01:00
Shelikhoo
7b721e1a6f
support chain proxy for h2
2021-05-09 15:14:28 +01:00
Shelikhoo
1038823ee9
support chain proxy for grpc
2021-05-09 15:13:18 +01:00
Shelikhoo
31a7fb503c
update TCPKeepAliveInterval type to allow expression disable
2021-05-06 15:33:35 +01:00
Loyalsoldier
1cb9fd2999
Chore: little refinements ( #973 )
2021-05-05 07:28:09 +08:00
Shelikhoo
44514ebc1a
Merge branch 'dev-wsearlydatadiverse'
2021-05-04 22:50:06 +01:00
Shelikhoo
e0f02dcca6
add required import
2021-05-04 22:46:16 +01:00
Shelikhoo
8aff3e09a4
update tcp keep alive interval config
2021-05-04 22:39:28 +01:00
Shelikhoo
c564c84b17
set TCP keep alive only on TCP socket
2021-05-04 22:30:41 +01:00
Shelikhoo
1dfe55fac8
Merge branch 'master' of https://github.com/therealak12/v2ray-core into therealak12-master-pr962
2021-05-04 22:28:26 +01:00
Shelikhoo
00a4551637
add document for temporary API:DNSResolverFunc, DNSResolverFunc
2021-05-04 22:25:37 +01:00
rurirei
2129c6e1e9
feat: update bootstrap_dns_android ( #966 )
...
* update with non_specified network
* remove wrongs
* add alternative bootstrapDialer
* do test
* Update dns_bootstrap_android_test.go
* example of alternative dialer
* public method
* move const
* Update dns_bootstrap_android_test.go
* no duplicated
* Rename infra/conf/dns_bootstrap_android.go to transport/internet/system_dns_android.go
* Update system_dns_android.go
* Update and rename infra/conf/dns_bootstrap_android_test.go to transport/internet/system_dns_android_test.go
* no imports
* Update system_dns_android.go
* Update system_dns_android_test.go
* create systemDNS
* Create system_dns_android.go
* Update system_dialer.go
* call Resolver on systemDialer
* create system_dns_test.go
* resolver.LookupIP params
* param fix
* noneed TestSystemDNSResolver
* revert: no specified resolver
* Delete system_dns.go
* android only
* android only test
* typo
2021-05-04 22:22:01 +01:00
Shelikhoo
0fbd8a1fd1
fix coding style
2021-05-04 20:47:19 +01:00
Shelikhoo
452de7c964
apply h2 http header on server side
2021-05-04 20:32:27 +01:00
Shelikhoo
2847bc3271
Add method, header support to http2 transport
2021-05-04 20:30:09 +01:00
Shelikhoo
957d7791c4
Regenerate proto: Add method support to http2 transport
2021-05-04 20:30:09 +01:00
Shelikhoo
6e5b8dcd8f
Add method support to http2 transport
2021-05-04 20:30:08 +01:00
Shelikhoo
4701a225f4
Regenerate proto: Add header support to http2 transport
2021-05-04 20:30:08 +01:00
Shelikhoo
4b1d6ec4d1
Add header support to http2 transport
2021-05-04 20:29:54 +01:00
Ahmad Karimi
ab6480ef72
Fix: add keep alive request duration to configs
2021-05-02 23:36:30 +04:30
rurirei
1822504ed8
Fix: nullcheck on alternative systemDialer ( #959 )
...
* fix: null-check on alternative systemDialer
* delete deprecated option DualStack
2021-05-02 22:28:33 +08:00
Loyalsoldier
625a15e03b
Chore: format code by new customized goimports ( #950 )
2021-05-01 11:15:39 +08:00
Shelikhoo
d378b8c42e
add support for header based early data on server side
2021-05-01 01:32:35 +01:00
Shelikhoo
75231604c7
add support for header based early data on server side
2021-05-01 01:31:41 +01:00
Shelikhoo
54d0c3d400
added client support for header based websocket early data
2021-05-01 01:14:16 +01:00
Shelikhoo
b446001de8
update generated protobuf for websocket
2021-05-01 00:49:25 +01:00
Shelikhoo
dd5048c702
define early data header name in websocket protobuf
2021-05-01 00:48:04 +01:00
Shelikhoo
408b5adc1c
apply coding style
2021-05-01 00:41:53 +01:00
Shelikhoo
7a6f887fe3
relocated browser forwarder interface
2021-05-01 00:06:10 +01:00
Shelikhoo
50bdcc24a7
pinned cert test
2021-04-15 20:03:33 +01:00
Shelikhoo
ebb720804d
refactored cert pin
2021-04-15 20:02:48 +01:00
Shelikhoo
92b845a45b
added calculation of certificate hash as separate command and tlsping, use base64 to represent fingerprint to align with jsonPb
2021-04-15 19:01:55 +01:00
Shelikhoo
34a3850f16
publish cert chain hash generation algorithm
2021-04-15 18:17:52 +01:00
Shelikhoo
59472de6a9
verify peer cert function for better man in the middle prevention
2021-04-15 18:16:19 +01:00
Shelikhoo
e1de9c9bed
fix coding style lint
2021-04-05 19:43:28 +01:00
Shelikhoo
3a77bbdf65
fix early data listener bug
2021-04-05 19:34:22 +01:00
Bhoppi Chaw
0dcd1f4992
fix QUIC disconnecting issue ( #850 )
...
Co-authored-by: Bhoppi Chaw <bhoppi#outlook,com>
2021-04-04 16:32:56 +08:00
loyalsoldier
090a659cab
Chore: fix lint
2021-03-28 09:33:00 +08:00
loyalsoldier
a0c817888b
Chore: format code
2021-03-28 08:44:04 +08:00
loyalsoldier
24948c6520
Merge branch 'master' into dev-wsimprovement
2021-03-28 08:40:05 +08:00
mzz
5f851c05b1
fix(tproxy): the problem that cannot find ipv6 destination in redirect mode of tproxy ( #815 )
...
* fix(tproxy): the problem that cannot find ipv6 destination in redirect mode of tproxy
* chore(lint): reformat the code
* chore(lint): Codacy Static Code Analysis
2021-03-25 16:42:58 +08:00
Loyalsoldier
f3a56ca090
Feat: update lucas-clemente/quic-go to v0.20.0 ( #816 )
2021-03-22 22:26:30 +08:00
Shelikhoo
af641f3219
added browser forwarder early data
2021-03-20 22:03:43 +00:00
Loyalsoldier
9e9173acb4
Chore: update protobuf & dependencies ( #793 )
...
* Chore: update protobuf
* Chore: regenerate mock files
* Chore: update dependencies
* Chore: use Go v1.16.2 and later
2021-03-18 12:17:26 +08:00
Shelikhoo
1eaec6818a
Fix max delay unintentionally low
2021-03-16 12:49:23 +00:00
Loyalsoldier
4028a09e70
Revert "Test: fix http2 dial timeout ( #570 )" ( #778 )
...
* Revert "Test: fix http2 dial timeout (#570 )"
This reverts commit 405a051c50
.
* Feat: lower the payload size
* Remove state.NegotiatedProtocolIsMutual
It has been deprecated since Go 1.16 because it shouldn't be used: this value is always true.
2021-03-15 16:57:33 +08:00
maskedeken
fb9a5a136b
Add remote address to grpc transport layer conn ( #783 )
...
* Add remote address to grpc transport layer conn
* go fmt
2021-03-15 16:50:09 +08:00
Loyalsoldier
e46204f828
Chore: fix lint according to golangci-lint errors ( #781 )
...
* Chore: fix lint according to golangci-lint errors
* Chore: regenerate pb.go files
2021-03-14 07:44:47 +08:00
Loyalsoldier
88e1e25aa9
Chore: format import using goimports ( #780 )
2021-03-14 07:09:51 +08:00
Shelikhoo
971eddaa12
fix applied wrong name, and wrong varible name
2021-03-11 15:02:31 +00:00
Xiaokang Wang
aaa9e788e7
Grpc Gun Transport ( #757 )
...
* introduce grpc transport structure
* fix package name inconsistency
* grpc gun transport dialer and listener
* add selective build tag
* add grpc:gun listener
* add grpc:gun config
* add generated files
* various bug fix for gun:grpc transport
* Cache dialed connections
* grpc:gun Use V2Ray Managed Dial function
* Update destination.pb.go
* Update gun.go
* GunSettings -> GunConfig
* gu -> gs
* add grpc alias
Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
Co-authored-by: kslr <kslrwang@gmail.com>
2021-03-11 16:46:17 +08:00
Loyalsoldier
e03947e6b0
Chore: update protobuf & dependencies ( #748 )
2021-03-08 05:12:27 +08:00
Shelikhoo
867bbb429e
create session content in the context if do not exist yet
2021-03-06 14:33:20 +00:00
Shelikhoo
e8ac0412a5
workaround crash when V is not in context
2021-03-05 16:27:02 +00:00
Shelikhoo
0010783191
Merge chained proxy with transport support
2021-03-03 23:27:26 +00:00
Loyalsoldier
49cf614346
Chore: update dependencies & protobuf ( #728 )
2021-03-03 17:31:53 +08:00
秋のかえで
b084b4f980
Fix ALPN being set to h2 by default when using TCP ( #716 )
2021-03-01 16:23:59 +08:00
Shelikhoo
e532085d3c
don't build tagged outbound dial on configure setting
2021-02-28 19:59:45 +00:00
Shelikhoo
bf6e8f2389
Added Auto generated file
2021-02-28 19:58:22 +00:00
Shelikhoo
6925870600
Fix forced outbound tag not set correctly
2021-02-28 19:57:21 +00:00
Shelikhoo
5f3851df39
Fix dependency cycle caused by core import in internet package
2021-02-28 19:10:38 +00:00
Shelikhoo
dd51d32250
Added Transport Layer Chained Proxy Support
2021-02-28 18:47:31 +00:00
Shelikhoo
8980cf2fcc
Regenerate protobuf for transport layer chain proxy
2021-02-28 17:52:16 +00:00
Shelikhoo
aaa55fc9d2
Add definition for transport layer chained proxy
2021-02-28 17:50:45 +00:00
Loyalsoldier
f94dd11a8c
Chore: change module name ( #677 )
2021-02-17 04:31:50 +08:00
Loyalsoldier
f98944c9e0
Chore: update protobuf ( #670 )
2021-02-11 14:57:20 +08:00
Kslr
405a051c50
Test: fix http2 dial timeout ( #570 )
...
* fix http2 dial timeout
2021-01-11 17:03:03 +08:00
kslr
d04a786a85
Fix: http2: listen port failed use error level log
...
ref https://github.com/v2fly/v2ray-core/issues/576
2021-01-03 07:11:59 +08:00
RPRX
a58bfc4ba4
SessionTicketsDisabled: false -> true
2021-01-01 11:25:04 +00:00
RPRX
4d2e782fbe
Disable session resumption by default ( #569 )
2021-01-01 17:01:14 +08:00
dyhkwong
291eff1aa3
Refine Android build ( #525 )
...
Co-authored-by: ghost <noreply@example.com>
2020-12-17 08:50:13 +08:00
Loyalsoldier
eed3f5a13f
Fix: typo ( #524 )
2020-12-16 09:26:25 +08:00
Loyalsoldier
e6fb0e1e5d
Suppress lint error ( #486 )
2020-12-03 16:14:34 +08:00
Loyalsoldier
cf11bf0498
Suppress lint error ( #480 )
2020-12-02 21:07:58 +08:00
Loyalsoldier
b68f943c78
Fix lint according to golangci-lint ( #439 )
2020-11-22 05:05:01 +08:00
Kslr
623cb24644
Remove XTLS ( #431 )
...
* remove xtls
* generate pb
* Update protoc
* Clean up go.mod & go.sum
* format code
* restore vless flow
* fix codacy
* do NOT interfere with pb.go files
Co-authored-by: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2020-11-20 15:53:10 +08:00
Chinsyo
231f5bf024
Add missing deprecation notice to deprecated code ( #437 )
2020-11-20 15:18:44 +08:00
Chinsyo
2ac380788b
Some minor fixes ( #433 )
2020-11-20 01:02:52 +08:00
Chinsyo
c4c750d03f
change temporary variable to lower camel case ( #427 )
...
Co-authored-by: Chinsyo <chinsyo@sina.cn>
2020-11-17 15:14:48 +08:00
lucifer
770b994337
Refine unix domain socket ( #367 )
2020-10-29 07:30:38 +00:00
Kslr
a770d72ca4
Merge pull request #168 from p4gefau1t/fix-mkcp-control-window
...
fix mkcp sending window
2020-10-26 00:46:14 +08:00
Kslr
f7ed96f5d4
Merge pull request #292 from Loyalsoldier/refine-code
...
Refine code according to golangci-lint results
2020-10-13 13:50:04 +08:00
RPRX
d1ed330f9f
Remove XTLS WriteMultiBuffer method
2020-10-13 04:33:11 +00:00
loyalsoldier
784775f689
Refine code according to golangci-lint results
2020-10-11 19:22:46 +08:00
RPRX
ff6bb51732
Fix XTLS over mKCP ( #302 )
2020-10-11 02:52:38 +00:00
Kslr
a44e1ede5b
update to IETF QUIC draft-29 ( #287 )
...
* update to IETF QUIC draft-29
2020-10-09 10:04:35 +08:00
RPRX
bcc7b78ff7
Add XTLS support to mKCP ( #267 )
2020-10-06 16:25:02 +00:00
Loyalsoldier
bb44d01096
Format proto files using clang-format according to google style ( #264 )
...
* Format proto files using clang-format according to google style
* Regenerate pb.go files
2020-10-05 08:36:40 +08:00
loyalsoldier
b181045b0c
Errorgen: support to run outside of GOPATH
2020-10-04 13:06:12 +08:00
RPRX
cde63bfac1
Add XTLS support to DomainSocket ( #241 )
2020-09-30 08:40:08 +00:00
RPRX
97eddc2374
Add XTLS support
2020-09-21 14:56:43 +00:00
DuckSoft
9def692b21
kcp: removing annoying NewAEADAESGCMBasedOnSeed hint
2020-09-20 17:47:15 +08:00
Page Fault
1a652933d9
fix mkcp sending window
2020-09-08 07:01:16 +00:00
lucifer9
801b9490b8
fix abstract UDS & add PROXY protocol support to DS inbound
2020-09-04 15:35:54 +08:00
loyalsoldier
f12f76582f
Fix according to staticcheck result
...
staticcheck repo: https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck
2020-08-30 23:41:15 +08:00
loyalsoldier
1fa89b32d4
Format: run go fmt ./...
2020-08-30 21:17:22 +08:00
lucifer
4c9210cf11
Parse X-Forwarded-For in http transport ( #142 )
...
* Parse X-Forwarded-For
* Update hub.go
Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
2020-08-30 04:30:05 +00:00
loyalsoldier
f9175e3bc8
Fix according to go vet results
2020-08-26 19:35:33 +08:00
RPRX
f5642b4075
L -> l, A -> a
2020-08-26 05:01:35 +00:00
RPRX
9046bea466
Adjust TCP inbound logs
2020-08-26 04:50:00 +00:00
RPRX
a3bc930075
Add PROXY protocol support to WS inbound
...
https://github.com/v2fly/v2ray-core/pull/103
2020-08-26 04:29:12 +00:00
Loyalsoldier
ef460f68f8
Adjust Protocol Buffers ( #109 )
...
* Update protoc binary executable files to v3.13.0
* Write proto files in more standard way
* Make go generate & vprotogen compatible with protoc-gen-gofast
* Regenerate pb.go files according to new proto files
* Clean go.sum by running go mod tidy
* Implement mustEmbedUnimplementedServiceServer for gPRC services
2020-08-24 12:10:26 +00:00
lucifer
5df17338a1
Add PROXY protocol support to tcp inbound ( #103 )
...
* Add PROXY protocol support to tcp inbound
* add settings for PROXY protocol
* Adjust hub.go
Co-authored-by: RPRX <63339210+rprx@users.noreply.github.com>
2020-08-21 13:31:44 +00:00
Vigilans
39cbe4ab13
Implement setReuseAddr
and setReusePort
in sockopt_{os}.go
2020-07-31 01:20:12 +08:00
Vigilans
bb932d8a1e
Move setting of SO_REUSEPORT out of applyInboundSocketOptions
2020-07-31 00:01:36 +08:00
RPRX
9311cb18e4
Remove unused utls
2020-07-20 05:59:46 +00:00
Kslr
a8f3450b89
Merge pull request #38 from yuhan6665/master
...
Add stats counter for outbounds
2020-06-28 16:29:29 +08:00
Shelikhoo
e4acbcee8f
Allow the use of Browser Bridge
2020-06-28 15:54:53 +08:00
yuhan6665
f34c092a06
Rename fields in StatCouterConnection
...
The fields will be used by Outbounds as well in the next commit
2020-06-27 00:31:46 -04:00
Xiaokang Wang
327a6ee1f7
Merge pull request #18 from darhwa/enhance_http_outbound
...
使http outbound支持连接https与http/2代理服务器
2020-06-25 16:25:44 +08:00
Roger Shimizu
90af5f19ba
Apply Debian's patch to upstream
2020-06-24 12:57:03 +08:00
Darhwa
d29370a654
Enhance http outbound
...
1. Enables http outbound to set up a HTTP tunnel above HTTP/1.1,
HTTP/1.1 over TLS, or HTTP/2 over TLS. Previously it only works for
plain HTTP/1.1
2. In setting up CONNECT tunnel, replaces handcrafted request with
standard http.Request
2020-06-20 23:03:44 +08:00
Darhwa
8e791e92bc
Further strip unique signatures of tls handshake
...
1. allow users to disable session ticket
2. set default alpn to ["h2", "http/1.1"]
2020-06-18 11:32:37 +08:00
Shelikhoo
8988dc32b9
Update Version
2020-06-10 11:15:28 +08:00
Shelikhoo
aece8a6a86
Added Seed to mKCP, encrypts the packets
2020-06-09 08:36:40 +08:00
Shelikhoo
09b81b78c3
regenerate pb data
2020-06-08 16:16:32 +08:00
Shelikhoo
b610fc0a70
make error less sensitive
2020-06-03 16:32:58 +08:00
Shelikhoo
221a13e658
Early detection of non http traffic to match web server behavior
2020-06-03 15:44:25 +08:00
Shelikhoo
087a62ef3d
Fixed HTTP response not adjusted based on request
2020-06-03 15:16:03 +08:00
Araragi Hokuto
2a96605138
Fix build failure on illumos
...
Previously v2ray can not be built on illumos due to following reasons:
1. missing build tags in transport/internet/sockopt_other.go
2. many definitions in syscall does not exist on illumos
This commit addresses these problems by adding missing build tags, and
updates those missing syscall deps on illumos to use x/sys/unix.
2020-05-31 12:37:24 +08:00
vcptr
524b2aca56
let crypto/tls choose the proper ciphers
2020-05-31 11:25:56 +08:00
vcptr
e62e6608e1
tls use crypto std cipher suites
2020-05-31 11:25:50 +08:00
lucifer9
2bd5f2fe96
add SO_REUSEPORT for freebsd 11
2020-03-24 21:52:03 +08:00
lucifer9
9608f77ba8
fix udp not work in ipv4 using common config
2020-03-12 00:42:29 +08:00
lucifer9
d055c0497d
fix tproxy udp "unable to get destination" in IPv6 environment
2020-03-12 00:42:29 +08:00
nullptr
450bc5b3f0
Add SO_REUSEPORT to inbound
2020-03-12 00:42:29 +08:00
lucifer9
e176746d03
make Codacy/PR Quality Review happy
2020-03-12 00:42:29 +08:00
lucifer9
8c6dac924c
code cleanup to make Codacy/PR Quality Review happy
2020-03-12 00:42:29 +08:00
lucifer
2ad7060375
add freebsd/pf support:
...
- transparent proxy (pf rdr) in IPv4 environment
- support both tcp and udp
- enable TCP_FASTOPEN, SO_REUSEPORT_LB, SO_REUSEADDR
- sockopt:mark is mapped to SO_USER_COOKIE
2020-03-12 00:42:29 +08:00
Kslr
ae04c402da
Revert "Fix self-signed certificates on Windows"
2019-10-28 23:00:09 +08:00
Kslr
5bb4efd126
Merge pull request #1893 from lixin9311/patch-1
...
Fix self-signed certificates on Windows
2019-10-27 15:23:39 +08:00
Kslr
d0ac3e9d8e
Merge pull request #1940 from enihcam/master
...
Add SO_REUSEPORT (kernel level load balance) support
2019-10-19 12:19:09 +08:00
vcptr
fa0a21f0dd
external module refraction-networking/utls use mod version
2019-10-19 10:22:49 +08:00
vcptr
5d9e2e69a9
external module gorilla/websocket use mod version
2019-10-19 10:05:40 +08:00
nullptr
ed1ade4266
Add SO_REUSEPORT (kernel level load balance) support
2019-10-13 12:12:49 +08:00
vcptr
8759e28890
update for go1.13+
2019-10-10 14:56:01 +08:00
lucus lee
3b087bf8c4
Fix self-signed certificates on Windows
2019-09-22 22:15:27 +09:00
lucifer9
e6bf431f93
add server side h2c support
2019-07-05 11:18:00 +08:00
Kirill Motkov
0401a91ef4
Some code improvements
...
* Rewrite empty string checks more idiomatically.
* Change strings.ToLower comparisons to strings.EqualFold.
* Rewrite switch statement with only one case as if.
2019-06-28 17:53:44 +03:00
Kslr
c5635f9507
sync fly, enable tls 1.3
2019-05-17 17:54:04 +08:00
Darien Raymond
cc513c1002
fix gerCertPool() on windows
2019-02-27 14:51:51 +01:00