crossbario / crossbario/autobahn-python
How to establish IPv6 connections in websocket?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 768
- PR merge metrics
- No merged PRs in 30d
Description
Here is an example.
if __name__ == "__main__":
factory = websocket.WebSocketServerFactory(u"wss://{WS_BIND_IP}:{WS_PORT}")
factory.protocol = ServerProtocol
listenWS(factory)
reactor.run()
WS_BIND_IP is my ipv6 address and WS_PORT is 11111 for example. Then use wscat to test websocket.
wscat ws://127.0.0.1:11111 return Connected.
wscat ws://my_ipv4_address:11111 return Connected.
wscat ws://[::]:11111 return error: connect ECONNREFUSED :::11111
wscat ws://[my_ipv6_address]:11111 return error: connect ECONNREFUSED my_ipv6_address:11111
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Python WebSocket server example with the IPv6 bind address, then compare its behavior with the working IPv4 cases using the shown wscat commands. Done means the cause of the IPv6 connection refusal is identified and the issue includes a verified way to establish an IPv6 WebSocket connection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100