Skip to content

Commit

Permalink
g3proxy: delete outdated ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq authored and zh-jq-b committed Nov 19, 2024
1 parent 7ca7fff commit d9b007c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 100 deletions.
4 changes: 4 additions & 0 deletions scripts/coverage/g3proxy/0001_base_http_proxy/g3proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ server:
type: http_proxy
listen: 127.0.0.1:8080
escaper: default
- name: tcp
type: plain_tcp_port
listen: '[::1]:8080'
server: http
- name: tls
type: native_tls_port
listen: 127.0.0.1:8443
Expand Down
4 changes: 4 additions & 0 deletions scripts/coverage/g3proxy/0001_base_http_proxy/testcases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ test_http_proxy_http_forward
test_http_proxy_ftp_over_http


HTTP_PROXY="http://[::1]:8080"
test_http_proxy_http_forward


HTTPS_PROXY="https://g3proxy.local:8443"
test_https_proxy_http_forward
test_https_proxy_ftp_over_http
Expand Down
9 changes: 9 additions & 0 deletions scripts/coverage/g3proxy/0007_chain_socks_proxy/g3proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ server:
- name: socks2
type: socks_proxy
listen: 127.0.0.1:1081
escaper: chained_socks5
use_udp_associate: true
- name: socks3
type: socks_proxy
listen: 127.0.0.1:1082
escaper: chained_socks5s
- name: socks4
type: socks_proxy
listen: 127.0.0.1:1083
escaper: chained_socks5s
use_udp_associate: true
- name: http
Expand Down
22 changes: 8 additions & 14 deletions scripts/coverage/g3proxy/0007_chain_socks_proxy/testcases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@ test_http_proxy_http_forward
#test_http_proxy_ftp_over_http


SOCKS5_PROXY="socks5h://127.0.0.1:1080"
test_socks5_proxy_http
test_socks5_proxy_dns
for port in 1080 1081 1082 1083
do
SOCKS5_PROXY="socks5h://127.0.0.1:${port}"
test_socks5_proxy_http
test_socks5_proxy_dns


SOCKS4_PROXY="socks4a://127.0.0.1:1080"
test_socks4_proxy_http


SOCKS5_PROXY="socks5h://127.0.0.1:1081"
test_socks5_proxy_http
test_socks5_proxy_dns


SOCKS4_PROXY="socks4a://127.0.0.1:1081"
test_socks4_proxy_http
SOCKS4_PROXY="socks4a://127.0.0.1:${port}"
test_socks4_proxy_http
done
78 changes: 0 additions & 78 deletions scripts/coverage/g3proxy/g3proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,24 +173,11 @@ server:
type: socks_proxy
listen: 127.0.0.1:11080
escaper: direct
- name: socks11081
type: socks_proxy
listen: 127.0.0.1:11081
escaper: direct
enable_udp_associate: true
- name: socks11082
type: socks_proxy
listen: 127.0.0.1:11082
escaper: direct
user-group: default
- name: http20080
type: http_proxy
listen: 127.0.0.1:20080
escaper: proxy10080
- name: http20081
type: http_proxy
listen: 127.0.0.1:20081
escaper: proxy11080
- name: http20082
type: http_proxy
listen: 127.0.0.1:20082
Expand All @@ -203,56 +190,10 @@ server:
type: http_proxy
listen: 127.0.0.1:20084
escaper: float11080
- name: http20443
type: http_proxy
listen: 127.0.0.1:20443
escaper: proxy10443
- name: socks21080
type: socks_proxy
listen: 127.0.0.1:21080
escaper: proxy11080
- name: socks21081
type: socks_proxy
listen: 127.0.0.1:21081
escaper: proxy11080
enable_udp_associate: true
- name: socks21082
type: socks_proxy
listen: 127.0.0.1:21082
escaper: proxy10080
- name: socks21083
type: socks_proxy
listen: 127.0.0.1:21083
escaper: float11080
- name: httpbin8080
escaper: direct
type: http_rproxy
listen: 127.0.0.1:8080
hosts:
- exact_match: g3proxy.local
upstream: 127.0.0.1:9443
tls_client:
ca_certificate: rootCA.pem
tls_name: httpbin.local
- name: httpbin8443
escaper: direct
type: http_rproxy
listen: 127.0.0.1:8443
enable_tls_server: true
hosts:
- exact_match: g3proxy.local
tls_server:
certificate: g3proxy.local.pem
private_key: g3proxy.local-key.pem
upstream: 127.0.0.1:9443
tls_client:
ca_certificate: rootCA.pem
tls_name: httpbin.local
- name: tcp9080
escaper: direct
type: tcp_stream
listen: 127.0.0.1:9080
upstream: 127.0.0.1:80
- name: tls9443
escaper: direct
type: tls_stream
Expand All @@ -261,25 +202,6 @@ server:
certificate: httpbin.local.pem
private-key: httpbin.local-key.pem
upstream: 127.0.0.1:80
- name: sni9443
escaper: direct
type: sni_proxy
listen: "[::1]:9443"
- name: sni8080
escaper: direct
type: sni_proxy
listen: "[::1]:8080"
- name: tcpport9001
type: plain_tcp_port
listen: 127.0.0.1:9001
server: http10080
- name: tlsport9002
type: plain_tls_port
listen: 127.0.0.1:9002
server: http10080
tls_server:
certificate: g3proxy.local.pem
private_key: g3proxy.local-key.pem
- name: ppdpport9003
type: ppdp_tcp_port
listen: 127.0.0.1:9003
Expand Down
11 changes: 3 additions & 8 deletions scripts/coverage/g3proxy/testcases.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh

all_http_proxies="http://127.0.0.1:10080 http://t1:[email protected]:10082 http://t2:[email protected]:10082 http://127.0.0.1:20080 http://127.0.0.1:20443 http://127.0.0.1:9001 http://127.0.0.1:9003"
all_socks_proxies="socks5h://127.0.0.1:11080 socks5h://127.0.0.1:11081 socks5h://t1:[email protected]:11082 socks5h://127.0.0.1:21080 socks5h://127.0.0.1:21081 socks5h://127.0.0.1:9003"
partial_proxies="http://127.0.0.1:13128 http://127.0.0.1:10081 http://t3:[email protected]:10082 http://127.0.0.1:20081 http://127.0.0.1:20082 http://127.0.0.1:20083 http://127.0.0.1:20084 socks5h://127.0.0.1:21082 socks5h://127.0.0.1:21083"
all_http_proxies="http://127.0.0.1:10080 http://t1:[email protected]:10082 http://t2:[email protected]:10082 http://127.0.0.1:9003"
all_socks_proxies="socks5h://127.0.0.1:11080 socks5h://t1:[email protected]:11082 socks5h://127.0.0.1:9003"
partial_proxies="http://127.0.0.1:13128 http://127.0.0.1:10081 http://t3:[email protected]:10082 http://127.0.0.1:20082 http://127.0.0.1:20083 http://127.0.0.1:20084 socks5h://127.0.0.1:21083"
all_proxies="${all_http_proxies} ${all_socks_proxies} ${partial_proxies}"

##
Expand All @@ -12,11 +12,6 @@ echo "==== Update dynamic escapers"
./target/debug/g3proxy-ctl -G ${TEST_NAME} -p $PROXY_PID escaper float11080 publish '{"type":"socks5","addr":"127.0.0.1:11080"}'
./target/debug/g3proxy-ctl -G ${TEST_NAME} -p $PROXY_PID escaper direct_lazy publish "{\"ipv4\": \"127.0.0.1\"}"

## https proxy
echo "==== Https Proxy"
curl -x https://g3proxy.local:10443 http://httpbin.local/get --proxy-cacert "${SCRIPTS_DIR}/g3proxy/rootCA.pem"
curl -x https://g3proxy.local:9002 http://httpbin.local/get --proxy-cacert "${SCRIPTS_DIR}/g3proxy/rootCA.pem"

## httpbin
echo "==== httpbin"
for proxy in $all_proxies
Expand Down

0 comments on commit d9b007c

Please sign in to comment.