I was trying to use android API PeerClientConfiguration.setIceServers to set IceServers on Android device. I use IP to connect my server, turnserver port is 3478. I did a test with "https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/" on PC and I could get my ip successfully. Android p2p demo didn't show any logs when client couldn't connect to turnserver. I didn't know what was going on there. Could you tell me a way to debug client's program?
Hello Ivan H. Sorry for this late reply. I used dynamic usercombo and password. Following is my config file for turnserver.
listening-device=eth0 listening-port=3478 tls-listening-port=5349 listening-ip=22.214.171.124 relay-ip=126.96.36.199 verbose fingerprint lt-cred-mech use-auth-secret static-auth-secret=12369874 server-name=shequ realm=shequ cert=/etc/turn_server_cert.pem pkey=/etc/turn_server_pkey.pem log-file=/var/tmp/turn.log no-tlsv1 no-tlsv1_1 #no-tlsv1_2
The dynamic username and password used on android followed the rule below:
# usercombo -> "timestamp:userid"
# turn user -> usercombo
# turn password -> base64(hmac(secret key, usercombo))