1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-17 18:06:15 -05:00
Commit Graph

1242 Commits

Author SHA1 Message Date
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
Darien Raymond
8de236b08c
upper case http method 2019-02-28 14:36:31 +01:00
Darien Raymond
888494aac8
support attributes in session.Content 2019-02-28 11:45:06 +01:00
Darien Raymond
39835e8da2
specify protocol in http inbound 2019-02-28 10:37:27 +01:00
Darien Raymond
9957c64b4a
correctly propagate dns errors all the way through.
the internal dns system can correctly handle the cases where:
1) domain has no A or AAAA records
2) domain doesn't exist
fixes #1565
2019-02-21 13:43:48 +01:00
Darien Raymond
1531642768
benchmark test for user validator 2019-02-20 22:56:17 +01:00
Darien Raymond
c072d38e2c
refine tls connection 2019-02-17 00:58:02 +01:00
Darien Raymond
b488c42453
set recursive bits 2019-02-15 23:13:41 +01:00
Darien Raymond
2a6cad2f9b
fix inbound user in dekodemo door and http 2019-02-15 00:46:19 +01:00
Darien Raymond
634bba0f8a
fix user level in socks inbound 2019-02-15 00:28:26 +01:00
Darien Raymond
114ec4c74b
support dest override in dns outbound 2019-02-12 22:34:43 +01:00
Darien Raymond
69e8db7bbe
include question section in dns response 2019-02-12 13:29:12 +01:00
Darien Raymond
5530ead381
fix broken test 2019-02-10 19:47:26 +01:00
Darien Raymond
98950d5ada
remove dep of assert lib 2019-02-10 15:02:28 +01:00
Darien Raymond
b234cfb4c4
unify NewPacketReader 2019-02-07 19:14:37 +01:00
Darien Raymond
4f08b7c795
fix reading udp packets 2019-02-07 16:36:54 +01:00
Darien Raymond
2aa0c08709
check domain name 2019-02-06 21:02:03 +01:00
Darien Raymond
fae47083c2
set response bit in dns 2019-02-06 19:41:55 +01:00
Darien Raymond
836440c61a
dns outbound proxy 2019-02-06 10:21:04 +01:00
Darien Raymond
9d7efdd2e1
confonly 2019-02-02 22:19:40 +01:00
Darien Raymond
bdd71a44b4
remove dep on assert lib 2019-02-02 22:19:30 +01:00
Darien Raymond
2a0f3591f4
add confonly tag for blackhole 2019-02-01 21:00:08 +01:00
Darien Raymond
1ab94fed79
optimize v2ctl size 2019-02-01 20:08:21 +01:00
Darien Raymond
28189197b3
remove dependency of assert lib 2019-02-01 14:38:14 +01:00
Darien Raymond
c9958681f7
remove dependency on assert lib 2019-01-31 20:57:01 +01:00
Darien Raymond
b05514b02c
wait for both requests to finish before changing timeout 2019-01-30 21:38:25 +01:00
Darien Raymond
bb5a959876
refactor tproxy handling in dokodemo 2019-01-27 22:30:34 +01:00
SAPikachu
c89828e1fb Fix potential memory leak 2019-01-27 20:14:22 +08:00
SAPikachu
d8285161ba Properly handle TPROXY UDP connections 2019-01-25 15:49:34 +08:00
Darien Raymond
35432832c4
don't use new address if not in redirect mode 2019-01-14 22:57:53 +01:00
Darien Raymond
163776b182
remove dependency on assert lib 2019-01-08 23:27:02 +01:00
Darien Raymond
d26700a2fe
remove common/compare package 2019-01-07 00:12:04 +01:00
Darien Raymond
b52725cf65
DialUDP function 2019-01-05 21:43:22 +01:00
Darien Raymond
3de8389361
rename CloseError() to Interrupt() 2018-12-31 21:25:10 +01:00
Darien Raymond
ec95dca3e5
force packet reader in freedom on UDP 2018-12-11 10:17:50 +01:00
Darien Raymond
7e37d141e2
move parseHost to http protocol 2018-12-10 23:08:16 +01:00
Darien Raymond
427679e66d
simplify task execution 2018-12-06 11:35:02 +01:00
Darien Raymond
bea521537e
errors.Combine 2018-12-04 14:17:08 +01:00
Darien Raymond
057e271588
update proto lib 2018-12-01 17:39:51 +01:00
Darien Raymond
6870ead73e
remove unless check 2018-11-23 17:04:32 +01:00
Darien Raymond
5279296f03
remove use of context.WithValue in transport 2018-11-21 14:54:40 +01:00
Darien Raymond
234c8081f4
remove unused functions 2018-11-20 17:05:32 +01:00
Darien Raymond
769f770cf7
migrate NetworkList to []Network 2018-11-20 16:58:26 +01:00
Darien Raymond
8a82a3664c
pick IP family by local address in freedom 2018-11-19 21:36:46 +01:00
Darien Raymond
cb7646f682
remove unnecessary err object from SplitBytes 2018-11-18 19:44:32 +01:00
Darien Raymond
842a089dad
refactor multibuffer 2018-11-18 19:36:36 +01:00
Darien Raymond
0f324a613e
remove MultiBuffer.Release 2018-11-17 22:45:07 +01:00
Darien Raymond
a01fdc29a6
remove NewMultiBufferValue 2018-11-16 11:08:12 +01:00
Darien Raymond
f2f67132a7
refactor socks handshake 2018-11-15 23:37:53 +01:00
Darien Raymond
a20262ef20
allocate buffer on stack 2018-11-15 21:32:27 +01:00
Darien Raymond
ac4f868078
introduce go-cmp 2018-11-15 10:30:03 +01:00
Darien Raymond
6c7dcc35ab
remove buffer.WriteBytes 2018-11-14 22:55:20 +01:00
Darien Raymond
5c5816072e
use buffer for reading user id in socks 2018-11-14 20:23:52 +01:00
Darien Raymond
585608a796
propagate error 2018-11-14 19:17:11 +01:00
Darien Raymond
a14fae4b35
fix lint warnings 2018-11-13 23:19:58 +01:00
Darien Raymond
953bfac572
remove unnecessary assignment 2018-11-13 09:51:55 +01:00
Darien Raymond
77c03f0da5
move back to serial 2018-11-03 13:03:02 +01:00
Darien Raymond
128a90b98b
move link to transport 2018-11-03 12:36:29 +01:00
Darien Raymond
8bb018dae2
fix encoding bug in shadowsocks 2018-11-02 22:04:52 +01:00
Darien Raymond
18ddde4fd4
fix build break in shadowsocks 2018-11-02 21:35:59 +01:00
Darien Raymond
f7b96507f9
simplify buffer extension 2018-11-02 21:34:04 +01:00
Darien Raymond
35ccc3a49c
cleanup unnecessary method in serial. 2018-11-02 18:20:02 +01:00
Darien Raymond
815c7f09ba
migrate to std lib 2018-11-02 15:47:58 +01:00
Darien Raymond
ee489c95b3
remove Port.Bytes() 2018-11-02 15:14:34 +01:00
Darien Raymond
58e2ed3381
remove closure on ReadFullFrom 2018-11-02 15:01:33 +01:00
Victoria Raymond
787f37363b
Merge pull request #1352 from comwrg/more-cases-validator
add more test cases for `proxy/vmess/validator.go`
2018-11-02 09:35:19 +01:00
Darien Raymond
9f48a6d017
enable global padding for aead by default 2018-11-02 09:15:35 +01:00
comwrg
078a92128a
add more test cases for proxy/vmess/validator.go 2018-11-02 16:09:17 +08:00
comwrg
65df107eac
more readable for func generateNewHashes in proxy/vmess/validator.go 2018-11-02 10:06:44 +08:00
Darien Raymond
37d1a76139
more test cases 2018-10-24 19:16:07 +02:00
Darien Raymond
4988b5ad9a
update protbuf gen files 2018-10-23 22:36:33 +02:00
Darien Raymond
c2566e1331
cleanup unused scenarios 2018-10-22 22:40:53 +02:00
Darien Raymond
17e51b277b
move proxy.Dialer to internet.Dialer 2018-10-22 22:12:50 +02:00
Darien Raymond
f78cf6cfc2
testing with mock 2018-10-22 15:58:52 +02:00
Darien Raymond
307aac26b3
simplify dependency resolution 2018-10-22 11:26:22 +02:00
Darien Raymond
a5dcb0f13e
refactor dependency resolution 2018-10-21 10:27:13 +02:00
Darien Raymond
d9cdfffc69
comments 2018-10-19 16:23:29 +02:00
Darien Raymond
37f838985c
rename validator 2018-10-18 09:28:09 +02:00
Darien Raymond
4fcb39ded9
comments 2018-10-18 09:25:58 +02:00
Darien Raymond
595f3d685e
merge user info inbound metadata 2018-10-15 08:36:50 +02:00
Darien Raymond
abf0cb1ec4
move function to features 2018-10-13 15:15:49 +02:00
Darien Raymond
ca4d42f2bc
help function for create instance from config bytes 2018-10-11 22:48:57 +02:00
Darien Raymond
b4821c5ed5
move policy and dnsClient 2018-10-11 22:34:31 +02:00
Darien Raymond
273342d0b9
move stats and inbound to features directory 2018-10-11 21:14:53 +02:00
Darien Raymond
b6dc31d3fe
first part to move feature interfaces into dedicated directory 2018-10-11 20:43:37 +02:00
Darien Raymond
2e94561584
support mtproto conn type 0xee. fixes #1297 2018-10-11 11:11:11 +02:00
Iskander Sharipov
0cf3599db2 s/len/length/ s/cap/capacity/ to avoid builtin shadowing 2018-10-01 12:03:23 +03:00
Darien Raymond
091fa6ad23
use new errorgen 2018-09-30 23:08:41 +02:00
Darien Raymond
d55fbd7f8d
simplify error creation 2018-09-30 18:39:53 +02:00
Darien Raymond
00ea6e3cb2
update protobuf generated files 2018-09-30 18:39:28 +02:00
Darien Raymond
fce64b1665
reduce one pointer in TimedUserValidator 2018-09-26 10:19:38 +02:00
Darien Raymond
909cb9b27a
announce deprecated proto settings 2018-09-21 16:54:06 +02:00
Darien Raymond
94b880d060
move session based info into session package 2018-09-18 23:09:54 +02:00
Darien Raymond
383b84e7dd
unified tproxy option 2018-09-17 15:12:58 +02:00
Darien Raymond
7f697661cd
fix a typo 2018-09-17 11:57:56 +02:00
Darien Raymond
cb2658f2bf
Revert "pooled session objects"
This reverts commit a89ff38fe6.
2018-09-14 16:51:46 +02:00
Darien Raymond
2ad12084ba
Revert "put buffer into client session as allocation optimization"
This reverts commit 09b601528b.
2018-09-14 16:51:12 +02:00
Darien Raymond
d068f357bd
update proto lib 2018-09-14 11:00:59 +02:00
Darien Raymond
81c9968188
simplify crypto related code 2018-09-12 15:43:36 +02:00
Darien Raymond
09b601528b
put buffer into client session as allocation optimization 2018-09-12 15:27:45 +02:00
Darien Raymond
a89ff38fe6
pooled session objects 2018-09-11 20:15:15 +02:00
Darien Raymond
1cf5225c0a
fix a flaky test 2018-09-03 09:55:02 +02:00
Darien Raymond
aefbc4c5de
cleanup vmess inbound handler 2018-08-31 15:50:13 +02:00
Darien Raymond
eb05a92592
dont start periodic task until necessary 2018-08-29 23:00:01 +02:00
Darien Raymond
16051587b5
fix test break 2018-08-27 00:33:27 +02:00
Darien Raymond
54e1bb96cc
introduce in-memory user 2018-08-27 00:11:32 +02:00
Darien Raymond
4e30ac33d0
reduce delay on passive connections 2018-08-21 23:09:45 +02:00
Darien Raymond
57966adf49
revert reader creation based on per-connection buffer 2018-08-17 20:54:25 +02:00
Darien Raymond
2e11653694
remove BufferedReader.Direct 2018-08-17 20:45:23 +02:00
Darien Raymond
fdb3a7b57d
remove use of buf.NewSize() 2018-08-16 12:05:33 +02:00
Darien Raymond
fc9b833d3c
format code 2018-07-31 19:33:59 +02:00
Darien Raymond
d665cf3e72
refine reader creation in vmess inbound 2018-07-31 19:33:54 +02:00
Darien Raymond
5e65d7da6d
more accurate memory usage when buffer = 0 2018-07-31 16:05:57 +02:00
Darien Raymond
7baa6977d3
cleanup buf interfaces 2018-07-31 13:43:27 +02:00
Darien Raymond
6a06908456
optimize encryption read/write operations 2018-07-31 12:37:59 +02:00
Darien Raymond
8cfe77383f
writeHash 2018-07-30 22:54:24 +02:00
Darien Raymond
206f52affc
refine buffer interface 2018-07-30 22:45:06 +02:00
Darien Raymond
bf2d3890de
padding must be enabled when chunk masking is enabled 2018-07-30 09:49:00 +02:00
Darien Raymond
ebea255c74
eliminate partial writes 2018-07-28 15:03:40 +02:00
Darien Raymond
00384e69d4
remove speedtest 2018-07-25 23:35:02 +02:00
Darien Raymond
a21d769e37
speedtest 2018-07-25 19:22:36 +02:00
Darien Raymond
4b63638dca
update protobuf lib 2018-07-25 00:36:28 +02:00
Darien Raymond
e3cc12995f
fix some lint errors 2018-07-19 13:31:57 +02:00
Darien Raymond
2858b769dd
detect any ip 2018-07-18 16:29:29 +02:00
Darien Raymond
b9db4514e2
allow partial override in freedom 2018-07-18 16:21:40 +02:00
Darien Raymond
9a8488074e
env flag controlled global padding 2018-07-18 10:40:28 +02:00
Darien Raymond
c0e37ef34a
prototype for new sniffing mechanism 2018-07-16 13:47:00 +02:00
Darien Raymond
dde06289bb
backward compatibility 2018-07-14 22:06:39 +02:00
Darien Raymond
14dc6371d3
receive handshake address from tls conn 2018-07-14 13:58:24 +02:00
Darien Raymond
29ad2cbbdb
function to compare byte array 2018-07-12 23:38:10 +02:00
Darien Raymond
64a3333987
remove extra bytes reading 2018-07-09 17:26:43 +02:00
Darien Raymond
8a879deac1
max padding len as variable 2018-07-08 21:46:13 +02:00
Darien Raymond
f54a8735ab
global padding in vmess protocol 2018-07-07 15:42:24 +02:00
Darien Raymond
32d34c9869
fix dc id selection 2018-07-05 14:47:46 +02:00
Darien Raymond
b16d2e9463
make sure dc id is valid. 2018-07-04 22:26:15 +02:00
Darien Raymond
d7def8bf47
apply policy in mtproto inbound 2018-07-04 18:58:19 +02:00
Darien Raymond
5c2bf477bb
check connection type 2018-07-04 18:47:06 +02:00
Darien Raymond
0d94d25688
prototype of mtproto proxy 2018-07-04 17:48:48 +02:00
Darien Raymond
e3cc852c57
udp dispatcher takes context with dispatching requests. fixes #1182. 2018-07-03 21:38:02 +02:00
Darien Raymond
59819871a1
change ip everytime when dial IP 2018-07-01 21:37:45 +02:00
Darien Raymond
4368edf87c
switch to pubsub in dns service 2018-07-01 12:38:40 +02:00
Darien Raymond
b05597df3a
fix passive connection in mux. fix #1167 2018-06-27 12:21:22 +02:00
Darien Raymond
ff0ae91b9b
update protobuf generated files 2018-06-26 16:28:54 +02:00
Darien Raymond
4f33540b19
temporary workaround for Tor command in socks. 2018-06-25 13:20:02 +02:00
Darien Raymond
9977eadf8c
remove dependency from errors to session 2018-06-25 01:09:02 +02:00
Darien Raymond
4a46817cf6
optimize map usage 2018-05-31 12:05:25 +02:00
Darien Raymond
adade2bffd
fix lint warnings 2018-05-31 11:55:11 +02:00
Darien Raymond
ac6a0f7511
update activity timer 2018-05-27 14:42:53 +02:00
Darien Raymond
13f3c356ca
unified task package 2018-05-27 13:02:29 +02:00
Darien Raymond
7fa4bb434b
fix pipe closing logic for inbound proxies. 2018-05-27 11:42:01 +02:00