Skip to content

Commit 0023d41

Browse files
committed
WIP
1 parent b93f301 commit 0023d41

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/run_all_tests.sh

+15
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ install_xray() {
1414
echo "xray installation completed."
1515
}
1616

17+
# Function to verify proxy dependency
18+
verify_proxy_dependency() {
19+
echo "Verifying proxy dependency..."
20+
21+
# Try to make a request without xray running - should fail
22+
if sudo env RUST_LOG=debug cproxy --port 1082 --redirect-dns -- curl -s -I --connect-timeout 5 https://www.google.com > /dev/null 2>&1; then
23+
echo "ERROR: Request succeeded without proxy running! Test failed."
24+
exit 1
25+
else
26+
echo "Verified: Request failed without proxy as expected."
27+
fi
28+
}
29+
1730
# Function to create xray configuration without TPROXY
1831
create_xray_config_normal() {
1932
echo "Creating xray configuration for normal mode..."
@@ -182,6 +195,8 @@ trap cleanup EXIT
182195

183196
# Main Execution Flow
184197
main() {
198+
verify_proxy_dependency
199+
185200
install_xray
186201

187202
# Test without TPROXY

0 commit comments

Comments
 (0)