Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,35 @@ buildvariants:
tasks:
- happy-eyeballs-task-group

- name: socks5-proxy-no-tls
display_name: "SOCKS5 Proxy (No TLS)"
# patchable: false
run_on:
- rhel87-small
tasks:
- test-socks5-proxy

- name: socks5-proxy-tls
display_name: "SOCKS5 Proxy (TLS)"
# patchable: false
run_on:
- rhel87-small
expansions:
SSL: ssl
tasks:
- test-socks5-proxy

- name: socks5-proxy-openssl
display_name: "SOCKS5 Proxy (OpenSSL)"
# patchable: false
run_on:
- rhel87-small
expansions:
SSL: ssl
OPENSSL: true
tasks:
- test-socks5-proxy

#- name: graviton-legacy
# display_name: "Graviton (legacy versions)"
# run_on:
Expand Down Expand Up @@ -1246,6 +1275,26 @@ tasks:
include_expansions_in_env:
- PROJECT_DIRECTORY

- name: test-socks5-proxy
commands:
- func: bootstrap mongo-orchestration
vars:
MONGODB_VERSION: rapid
TOPOLOGY: replica_set
- command: subprocess.exec
type: test
params:
working_dir: src
binary: bash
args:
- .evergreen/run-socks5-proxy-test.sh
include_expansions_in_env:
- PROJECT_DIRECTORY
- MONGODB_URI
- DRIVERS_TOOLS
- PYTHON3
- OPENSSL

#############
# Functions #
#############
Expand Down
30 changes: 30 additions & 0 deletions .evergreen/run-socks5-proxy-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -o errexit

source .evergreen/env.sh
source .evergreen/cargo-test.sh

FEATURE_FLAGS+=("socks5-proxy")
CARGO_OPTIONS+=("--ignore-default-filter")

if [ "$OPENSSL" = true ]; then
FEATURE_FLAGS+=("openssl-tls")
fi

# with auth
$PYTHON3 $DRIVERS_TOOLS/.evergreen/socks5srv.py --port 1080 --auth "username:p4ssw0rd" --map "localhost:12345 to localhost:27017" &
AUTH_PID=$!
# without auth
$PYTHON3 $DRIVERS_TOOLS/.evergreen/socks5srv.py --port 1081 --map "localhost:12345 to localhost:27017" &
NOAUTH_PID=$!

set +o errexit

cargo_test socks5_proxy
cargo_test run_uri_options_spec_tests

kill $AUTH_PID
kill $NOAUTH_PID

exit ${CARGO_RESULT}
67 changes: 51 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ features = ["sync"]
| `text-indexes-unstable` | Enables support for text indexes in explicit encryption. This feature is in preview and should be used for experimental workloads only. This feature is unstable and its security is not guaranteed until released as Generally Available (GA). The GA version of this feature may not be backwards compatible with the preview version. |
| `error-backtrace` | Capture backtraces in `Error` values. This can be slow, memory intensive, and very verbose. |
| `bson-3` | Use version 3.x of the `bson` crate; for backwards compatibility, without this feature enabled `bson` 2.x is used. |
| `socks5-proxy` | Enable SOCKS5 proxy support. |

## Web Framework Examples

Expand Down
Loading