Skip to content

Commit 5074c44

Browse files
committed
g3proxy: add testcase for tcp/tls stream server facts auth
1 parent 79fe3c8 commit 5074c44

3 files changed

Lines changed: 56 additions & 0 deletions

File tree

scripts/coverage/g3proxy/0025_sni_proxy_facts_auth/g3proxy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ user_group:
3535
tcp_conn_rate_limit: 100
3636
request_rate_limit: 500
3737
request_max_alive: 10000
38+
3839
server:
3940
- name: http
4041
type: http_rproxy
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
3+
log: stdout
4+
5+
stat:
6+
target:
7+
udp: 127.0.0.1:8125
8+
9+
resolver:
10+
- name: default
11+
type: c-ares
12+
server:
13+
- 127.0.0.1
14+
15+
escaper:
16+
- name: default
17+
type: direct_fixed
18+
resolver: default
19+
egress_net_filter:
20+
default: allow
21+
allow: 127.0.0.1
22+
23+
user_group:
24+
- name: match_by_facts
25+
type: facts
26+
static_users:
27+
- name: t1
28+
match_by_facts:
29+
- ip: 127.0.0.1
30+
- ip: "::1"
31+
32+
server:
33+
- name: tcp
34+
type: tcp_stream
35+
listen: 127.0.0.1:8080
36+
escaper: default
37+
user_group: match_by_facts
38+
auth_by_client_ip: true
39+
upstream: 127.0.0.1:80
40+
- name: tls
41+
type: tls_stream
42+
listen: 127.0.0.1:8443
43+
escaper: default
44+
user_group: match_by_facts
45+
auth_by_client_ip: true
46+
tls_server:
47+
cert_pairs:
48+
certificate: ../httpbin.local.pem
49+
private-key: ../httpbin.local-key.pem
50+
upstream: 127.0.0.1:80
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
python3 "${PROJECT_DIR}/g3proxy/ci/python3+curl/test_httpbin.py" -T http://httpbin.local:8080
4+
5+
python3 "${PROJECT_DIR}/g3proxy/ci/python3+curl/test_httpbin.py" -T https://httpbin.local:8443 --ca-cert "${TEST_CA_CERT_FILE}"

0 commit comments

Comments
 (0)