Skip to content

Commit dc2d99a

Browse files
squash for rebase
1 parent 5ff2c7b commit dc2d99a

File tree

15 files changed

+801
-268
lines changed

15 files changed

+801
-268
lines changed

.evergreen/config.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,35 @@ buildvariants:
399399
tasks:
400400
- happy-eyeballs-task-group
401401

402+
- name: socks5-proxy-no-tls
403+
display_name: "SOCKS5 Proxy (No TLS)"
404+
# patchable: false
405+
run_on:
406+
- rhel87-small
407+
tasks:
408+
- test-socks5-proxy
409+
410+
- name: socks5-proxy-tls
411+
display_name: "SOCKS5 Proxy (TLS)"
412+
# patchable: false
413+
run_on:
414+
- rhel87-small
415+
expansions:
416+
SSL: ssl
417+
tasks:
418+
- test-socks5-proxy
419+
420+
- name: socks5-proxy-openssl
421+
display_name: "SOCKS5 Proxy (OpenSSL)"
422+
# patchable: false
423+
run_on:
424+
- rhel87-small
425+
expansions:
426+
SSL: ssl
427+
OPENSSL: true
428+
tasks:
429+
- test-socks5-proxy
430+
402431
#- name: graviton-legacy
403432
# display_name: "Graviton (legacy versions)"
404433
# run_on:
@@ -1246,6 +1275,26 @@ tasks:
12461275
include_expansions_in_env:
12471276
- PROJECT_DIRECTORY
12481277

1278+
- name: test-socks5-proxy
1279+
commands:
1280+
- func: bootstrap mongo-orchestration
1281+
vars:
1282+
MONGODB_VERSION: rapid
1283+
TOPOLOGY: replica_set
1284+
- command: subprocess.exec
1285+
type: test
1286+
params:
1287+
working_dir: src
1288+
binary: bash
1289+
args:
1290+
- .evergreen/run-socks5-proxy-test.sh
1291+
include_expansions_in_env:
1292+
- PROJECT_DIRECTORY
1293+
- MONGODB_URI
1294+
- DRIVERS_TOOLS
1295+
- PYTHON3
1296+
- OPENSSL
1297+
12491298
#############
12501299
# Functions #
12511300
#############
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
5+
source .evergreen/env.sh
6+
source .evergreen/cargo-test.sh
7+
8+
FEATURE_FLAGS+=("socks5-proxy")
9+
CARGO_OPTIONS+=("--ignore-default-filter")
10+
11+
if [ "$OPENSSL" = true ]; then
12+
FEATURE_FLAGS+=("openssl-tls")
13+
fi
14+
15+
# with auth
16+
$PYTHON3 $DRIVERS_TOOLS/.evergreen/socks5srv.py --port 1080 --auth "username:p4ssw0rd" --map "localhost:12345 to localhost:27017" &
17+
AUTH_PID=$!
18+
# without auth
19+
$PYTHON3 $DRIVERS_TOOLS/.evergreen/socks5srv.py --port 1081 --map "localhost:12345 to localhost:27017" &
20+
NOAUTH_PID=$!
21+
22+
set +o errexit
23+
24+
cargo_test socks5_proxy
25+
26+
kill $AUTH_PID
27+
kill $NOAUTH_PID
28+
29+
exit ${CARGO_RESULT}

Cargo.lock

Lines changed: 51 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)