I have the following client-server code, server code is on desktop and client code is on a corporate server. I am connected to the corporate server using openvpn connect and IP address of Ethernet adapter vethernet is 172.17.148.33 on my desktop machine.
Server code:
import zmq
context=zmq.Context()
socket=context.socket(zmq.REP)
socket.bind("tcp://*:5554")
while True:
message=socket.recv_pyobj()
print("%s:%s" %(message.get(1)[0],message.get(1)[1]))
socket.send_pyobj({1:[message.get(1)[0],message.get(1)[1]]})
socket.close()
Client.py
context=zmq.Context()
print("Connecting")
socket=context.socket(zmq.REQ)
socket.connect("tcp://172.17.148.33:55554")
name="Testing"
while True:
message=input("Message:")
socket.send_pyobj(({1:[name,message]}))
question from:
https://stackoverflow.com/questions/65905054/unable-to-connect-client-to-server-over-vpn-connection 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…