Test socks with ipv4 address

This commit is contained in:
Roger A. Light
2022-12-19 15:24:48 +00:00
parent f70806f6e7
commit 985824da8d
+7 -10
View File
@@ -4,16 +4,11 @@
from mosq_test_helper import *
def do_test(proto_ver, ipver):
def do_test(proto_ver, host):
rc = 1
(port1, port2) = mosq_test.get_port(2)
if ipver == 4:
host = "localhost"
else:
host = "ip6-localhost"
cmd = ['microsocks', '-1', '-b', '-i', host, '-u', 'user', '-P', 'password', '-p', str(port1)]
try:
proxy = subprocess.Popen(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
@@ -82,7 +77,9 @@ def do_test(proto_ver, ipver):
exit(rc)
do_test(proto_ver=3, ipver=4)
do_test(proto_ver=4, ipver=4)
do_test(proto_ver=5, ipver=4)
do_test(proto_ver=5, ipver=6)
do_test(proto_ver=3, host="localhost")
do_test(proto_ver=4, host="localhost")
do_test(proto_ver=5, host="localhost")
do_test(proto_ver=5, host="ip6-localhost")
do_test(proto_ver=5, host="127.0.0.1")
#do_test(proto_ver=5, host="::1")