Closed mmabluesky closed 1 year ago
Currently, P2P connections with GT Client can be established between ao.space clients (iOS, Android, Web) and GT Client.
GT Client establishes a P2P connection with GT Client:
. /linux-arm64-client -local http://127.0.0.1:80/ -remote tcp://example.com:8080 -remoteSTUN stun:example.com:3478 -id id1 -secret secret1
. /linux-arm64-client -local http://127.0.0.1:80/ -remote tcp://example.com:8080 -remoteSTUN stun:example.com:3478 -id id2 -secret secret2 - tcpForwardAddr 127.0.0.1:10000 -tcpForwardHostPrefix id1
Traffic sent to 127.0.0.1:10000 will be forwarded to another GT Client via P2P. This is an experimental feature, and there are plans to implement it in the future with better design.
Next week, we will add sample code to show how to establish P2P connection between Web and GT Client, please stay tuned.
Here is the example about how to build WebRTC P2P connection with GT client on Web by using JavaScript:
https://github.com/ao-space/gt/blob/dev/example/dev/web/p2p.js
The question has been answered and this issue is closed
hi : the document mentions supporting WebRTC peer-to-peer connections. ,so, how can I achieve WebRTC peer-to-peer connection using GT ?