mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-26 12:27:28 +08:00
Test socks with ipv4 address
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user