Giter Club home page Giter Club logo

webrtc-docker's Introduction

WebRTC-Docker

Out-of-the-box docker images for AppRTC dev/test purpose.

AppRTC-Server

macOS host:

docker run --rm \
  -p 8080:8080 -p 8089:8089 -p 3478:3478 -p 3478:3478/udp -p 3033:3033 \
  -p 59000-65000:59000-65000/udp \
  -e PUBLIC_IP=<server public IP> \
  -it piasy/apprtc-server

Linux host:

docker run --rm --net=host \
  -e PUBLIC_IP=<server public IP> \
  -it piasy/apprtc-server

About port publish:

  • TCP 8080 is used for room server;
  • TCP 8089 is used for signal server;
  • TCP 3033 is used for ICE server;
  • TCP 3478, UDP 3478 and UDP 59000-65000 is used for TURN/STUN server;

So make sure your firewall has opened those ports.

WebRTC-Build

Only Android/Linux is supported.

docker run --rm \
  -e ENABLE_SHADOW_SOCKS=true \
  -e SHADOW_SOCKS_SERVER_ADDR=<your shadowsocks server ip> \
  -e SHADOW_SOCKS_SERVER_PORT=<your shadowsocks server port> \
  -e SHADOW_SOCKS_ENC_METHOD=<your shadowsocks encrypt method> \
  -e SHADOW_SOCKS_ENC_PASS=<your shadowsocks encrypt password> \
  -v <path to place webrtc source>:/webrtc \
  -it piasy/webrtc-build

Note: if your encrypt password contains special characters, remember to escape it with \, e.g. &bDmc! to \&bDmc\!.

If you don't need run shadowsocks proxy, you can run:

docker run --rm \
  -v <path to place webrtc source>:/webrtc \
  -it piasy/webrtc-build

After the docker image started, you can run fetch, gclient, gn, and ninja commands to download and build webrtc code.

webrtc-docker's People

Contributors

hazer avatar piasy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webrtc-docker's Issues

开发板momo连接问题

目前在arm开发板上跑momo的native webrtc程序,pc端的docker public_ip填写的是pc的网段地址192.168.31.135这样。
开发板上运行:momo ayame ws://192.168.31.135:8089/ws 123456789 一直报operator() Handshake: The WebSocket handshake was declined by the remote peer,这大概是什么原因导致? 是否能指教下有什么debug手段,在docker找了几个log,都没什么有用的信息。是否需要抓包?

貌似镜像拉下来后,启动dock 有点问题,莫非和我是M1的设备有关系?

docker run --rm
-p 8080:8080 -p 8089:8089 -p 3478:3478 -p 3478:3478/udp -p 3033:3033
-p 59000-65000:59000-65000/udp
-e PUBLIC_IP=10.23.57.254
-it piasy/apprtc-server
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
docker: Error response from daemon: Ports are not available: listen udp 0.0.0.0:62821: bind: address already in use.
ERRO[0000] error waiting for container: context canceled

ICE connection state changed to: failed

容器启动后无报错,不在同一局域网的两台设备互联时就会报以下错误,然后无法童话视频
ICE connection state changed to: failed
apprtc.debug.js:5652:5
ICE failed, add a STUN server and see about:webrtc for more details

WARNING: I cannot support STUN CHANGE_REQUEST functionality because only one IP address is provided

Piasy,你好,我按照文档把ICE_SERVER_BASE_URL 和 WSS_INSTANCE_HOST_KEY中的替换成了我自己的服务器IP,然后docker run 出现了一下警告,帮忙分析下原因,我是不是少了一些步骤?
WARNING: I cannot support STUN CHANGE_REQUEST functionality because only one IP address is provided

sudo docker run --rm \

-p 8080:8080 -p 8089:8089 -p 3478:3478 -p 3478:3478/udp -p 3033:3033
--expose=59000-65000
-e PUBLIC_IP=[my pub server ip]
-v [my constant.py dir]:/apprtc_configs
-t -i piasy/apprtc-server
0: log file opened: /var/log/turn_14_2017-12-31.log
0:
RFC 3489/5389/5766/5780/6062/6156 STUN/TURN Server
Version Coturn-4.5.0.6 'dan Eider'
0:
Max number of open files/sockets allowed for this process: 1048576
0:
Due to the open files/sockets limitation,
max supported number of TURN Sessions possible is: 524000 (approximately)
0:

==== Show him the instruments, Practical Frost: ====

0: TLS supported
0: DTLS supported
0: DTLS 1.2 supported
0: TURN/STUN ALPN supported
0: Third-party authorization (oAuth) supported
0: GCM (AEAD) supported
0: OpenSSL compile-time version: OpenSSL 1.0.2g 1 Mar 2016 (0x1000207f)
0:
0: SQLite is not supported
0: Redis is not supported
0: PostgreSQL is not supported
0: MySQL is not supported
0: MongoDB is not supported
0:
0: Default Net Engine version: 3 (UDP thread per CPU core)

=====================================================

0: Listener address to use: 0.0.0.0
0: Domain name:
0: Default realm: apprtc
0: Relay address to use: 0.0.0.0
0: pid file created: /var/run/turnserver.pid
0: IO method (main listener thread): epoll (with changelist)
0: WARNING: I cannot support STUN CHANGE_REQUEST functionality because only one IP address is provided
0: Wait for relay ports initialization...
0: relay 0.0.0.0 initialization...
0: relay 0.0.0.0 initialization done
0: Relay ports initialization done
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=1 created
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=0 created
0: IPv4. UDP listener opened on: 0.0.0.0:3478
0: Total General servers: 2
0: IO method (auth thread): epoll (with changelist)
0: IO method (admin thread): epoll (with changelist)
0: IO method (auth thread): epoll (with changelist)
0: IPv4. SCTP listener opened on : 0.0.0.0:3478
0: IPv4. TCP listener opened on : 0.0.0.0:3478
0: IPv4. TCP listener opened on : 0.0.0.0:3478
server started

OSError: Execution failed with error: [Errno 2] No such file or directory: 'vpython3'.

Piasy你好,
我正在阅读你的 WebRTC Native开发实战。
在使用书中的docker进行Android源码编译时出现了
OSError: Execution failed with error: [Errno 2] No such file or directory: 'vpython3'.
这个报错,经过一番查阅,初步判断是 depot_tools 版本太旧了。
请问这docker镜像还会更新不?
如果镜像太旧可能会成为编译的新问题。
或者有没有比较理想的方案让大家一起维护镜像的方案。
我刚入门,麻烦了。谢谢

chrome61 不支持非https调用getUserMedia

Piasy你好,有幸学习您的博客。按照博客使用docker 配置apprtc server,遇到两个问题,
一、进入房间提示:
[Deprecation] getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
二、ice连接失败:Failed to load http://xxx:3033/iceconfig?key=none: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://xxx:8080' is therefore not allowed access. The response had HTTP status code 404.
我使用的Chrome版本 61.0.3163.100(正式版本) (32 位)

No TURN Server

apprtc docker镜像运行后打开localhost:8080,提示No turn server

什么是 server public IP

你好,我不太清楚这个:
docker run --rm
-p 8080:8080 -p 8089:8089 -p 3478:3478 -p 3478:3478/udp -p 3033:3033
-p 59000-65000:59000-65000/udp
-e PUBLIC_IP=
-v :/apprtc_configs
-t -i piasy/apprtc-server
里面的server public IP应该是什么地址
我配置了某一个手机的ip。然后call的时候,第一个8080连接正常。
后面的数据是这样的:
12-01 14:03:18.106 21496-21797/org.appspot.apprtc D/RoomRTCClient: Room response: {"params": {"offer_options": "{}", "media_constraints": "{"video": true, "audio": true}", "room_link": "http://192.168.3.124:8080/r/ggg", "turn_server_override": [], "wss_url": "ws://:8089/ws", "pc_constraints": "{"optional": []}", "turn_url": "https://computeengineondemand.appspot.com/turn?username=55946333&key=4080218913", "version_info": "{"branch": "master", "time": "Thu Aug 24 11:33:50 2017 +0200", "gitHash": "3445a2b1ca5887294881c2a409310e6c3b69e868"}", "client_id": "55946333", "callstats_params": "{"appId": "none", "appSecret": "none"}", "pc_config": "{"rtcpMuxPolicy": "require", "bundlePolicy": "max-bundle", "iceServers": []}", "warning_messages": [], "wss_post_url": "http://:8089", "ice_server_url": "http://:3033/iceconfig?key=none", "messages": [], "include_rtstats_js": "", "bypass_join_confirmation": "false", "include_loopback_js": "", "room_id": "ggg", "ice_server_transports": "", "is_initiator": "false", "is_loopback": "false", "error_messages": []}, "result": "SUCCESS"}
12-01 14:03:18.107 21496-21797/org.appspot.apprtc D/RoomRTCClient: RoomId: ggg. ClientId: 55946333
12-01 14:03:18.107 21496-21797/org.appspot.apprtc D/RoomRTCClient: Initiator: false
12-01 14:03:18.107 21496-21797/org.appspot.apprtc D/RoomRTCClient: WSS url: ws://:8089/ws
12-01 14:03:18.107 21496-21797/org.appspot.apprtc D/RoomRTCClient: WSS POST url: http://:8089

这个server public IP 没生效。http://:8089是什么情况

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.