File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,19 @@ install_xray() {
14
14
echo " xray installation completed."
15
15
}
16
16
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
+
17
30
# Function to create xray configuration without TPROXY
18
31
create_xray_config_normal () {
19
32
echo " Creating xray configuration for normal mode..."
@@ -182,6 +195,8 @@ trap cleanup EXIT
182
195
183
196
# Main Execution Flow
184
197
main () {
198
+ verify_proxy_dependency
199
+
185
200
install_xray
186
201
187
202
# Test without TPROXY
You can’t perform that action at this time.
0 commit comments