moonlight-chrome icon indicating copy to clipboard operation
moonlight-chrome copied to clipboard

Socks proxy under linux

Open alkor-istar opened this issue 7 years ago • 6 comments

I am trying to access a Windows 10 server running nvidia-experience app. My client computer is behind a firewall but I can enter the local network through a ssh tunnel. This is my setup:

| Client PC | --> | Firewall | --> (internet) --> | Ssh Server | --> | Windows PC |

I tried running google-chrome in the client pc with the google-chrome-stable --proxy-server="socks5://127.0.0.1:54321" --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE 127.0.0.1" command line, but when trying to pair moonlight says: Pairing to 192.168.... failed. The console gives:

*   Trying 192.168.......
* Connection timed out after 3000 milliseconds
* Closing connection 0
* getaddrinfo(3) failed for 192.168..local:47984
* Couldn't resolve host '192.168....local'
* Closing connection 0
* getaddrinfo(3) failed for :47984
* Couldn't resolve host ''
* Closing connection 0
*   Trying 192.168....
* Connection timed out after 3000 milliseconds
* Closing connection 0

I used proxychains to run the old java app and I can pair, but it gives me this error in console:

[proxychains] config file found: /home/alcarinque/.proxychains/hydra/proxychains.conf
[proxychains] preloading /usr/lib/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.12
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp
Jun 26, 2018 4:43:59 PM com.limelight.LimeLog info
INFO: Reading Preferences
Jun 26, 2018 4:44:15 PM com.limelight.LimeLog info
INFO: Writing Preferences
Jun 26, 2018 4:44:15 PM com.limelight.LimeLog info
INFO: Loaded key pair from disk
[proxychains] Strict chain  ...  127.0.0.1:54321  ...  192. 168..6:47984  ...  OK
Jun 26, 2018 4:44:18 PM com.limelight.LimeLog info
INFO: Loaded key pair from disk
[proxychains] Strict chain  ...  127.0.0.1:54321  ...  192.16:47984  ...  OK
[proxychains] Strict chain  ...  127.0.0.1:54321  ...  tmp:21 <--socket error or timeout!
[proxychains] Strict chain  ...  127.0.0.1:54321  ...  tmp:21 <--socket error or timeout!
Jun 26, 2018 4:44:22 PM com.limelight.LimeLog info
INFO: Starting Sid Meier's Civilization VI
Jun 26, 2018 4:44:22 PM com.limelight.LimeLog info
INFO: Loaded key pair from disk
[proxychains] Strict chain  ...  127.0.0.1:54321  ...  192.168....:47984  ...  OK
Jun 26, 2018 4:44:23 PM com.limelight.LimeLog info
INFO: Server major version: 7
Jun 26, 2018 4:44:23 PM com.limelight.LimeLog info
INFO: Using deprecated app lookup method - Please specify an app ID in your StreamConfiguration instead
[proxychains] Strict chain  ...  127.0.0.1:54321  ...  192.168...:47984  ...  OK
[proxychains] Strict chain  ...  127.0.0.1:54321  ...  192.168..:47984  ...  OK
Jun 26, 2018 4:44:28 PM com.limelight.LimeLog info
INFO: Resumed existing game session
Jun 26, 2018 4:44:28 PM com.limelight.LimeLog info
INFO: Starting RTSP handshake
java.io.IOException: Unable to connect to UDP port 48010
	at com.limelight.nvstream.enet.EnetConnection.connect(EnetConnection.java:34)
	at com.limelight.nvstream.rtsp.RtspConnection.doRtspHandshake(RtspConnection.java:225)
	at com.limelight.nvstream.NvConnection.doRtspHandshake(NvConnection.java:265)
	at com.limelight.nvstream.NvConnection.establishConnection(NvConnection.java:321)
	at com.limelight.nvstream.NvConnection.access$3(NvConnection.java:302)
	at com.limelight.nvstream.NvConnection$1.run(NvConnection.java:374)
	at java.lang.Thread.run(Thread.java:748)

I checked the ports from the ssh server using nmap:

[alcarinque@Ithaqua ~]$ nmap 192.168... -p 47984,48010  
Starting Nmap 7.70 ( https://nmap.org ) at 2018-06-26 16:48 -03
Nmap scan report for  192.168... 
Host is up (0.00041s latency).

PORT      STATE SERVICE
47984/tcp open  unknown
48010/tcp open  unknown

Nmap done: 1 IP address (1 host up) scanned in 11.21 seconds


Is there anything else I could try?

alkor-istar avatar Jun 26 '18 19:06 alkor-istar

@alcarinque-istar I see you don't have all the ports opened in their correct protocols. See here for the full list as well as their protocols: https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide#streaming-over-the-internet

jorys-paulin avatar Jun 27 '18 07:06 jorys-paulin

Ok, I did a complete scan, and as you see some ports are indeed closed. But I think those are only opened when a game is running, just guessing.

Windows firewall is disabled. Moonlight for android is working fine in the local network using an Android cellphone.

nmap 192.168.... -p 47984,47989,48010,47998,47999,48000,48002
Starting Nmap 7.70 ( https://nmap.org ) at 2018-06-28 10:43 -03
Nmap scan report for 192.168.....
Host is up (0.00077s latency).

PORT      STATE  SERVICE
47984/tcp open   unknown
47989/tcp open   unknown
47998/tcp closed unknown
47999/tcp closed unknown
48000/tcp closed nimcontroller
48002/tcp closed nimhub
48010/tcp closed unknown

Nmap done: 1 IP address (1 host up) scanned in 11.22 seconds

I also tried this program: Sshuttle https://github.com/sshuttle/sshuttle Which makes a vpn using a ssh server. With this, it detects the computer when I enter the ip. It evens manages to run the game, but fails finishing establishing the stream. This is the log of such attempt:

Resolving host name...done
Starting RTSP handshake...setsockopt(SO_RCVTIMEO) failed: 92
setsockopt(SO_RCVTIMEO) failed: 92
setsockopt(SO_RCVTIMEO) failed: 92
setsockopt(SO_RCVTIMEO) failed: 92
setsockopt(SO_RCVTIMEO) failed: 92
setsockopt(SO_RCVTIMEO) failed: 92
setsockopt(SO_RCVTIMEO) failed: 92
setsockopt(SO_RCVTIMEO) failed: 92
done
Initializing control stream...done
Initializing video stream...done
Initializing audio stream...done
Initializing input stream...done
Starting control stream...[4233:4233:0628/103521.180446:ERROR:pepper_socket_utils.cc(72)] Host kneneiigihpjinpiaoidjolckmeaogdh cannot use socket API or destination is not allowed
RTSP: Failed to connect to UDP port 47999
failed: -1
Cleaning up input stream...done
Cleaning up audio stream...done
Cleaning up video stream...done
Cleaning up control stream...done
Cleaning up platform...done

As you see, it stills seems to be a network problem. Maybe is trying to resolve the hostname using some kind of broadcast that doesn't propagate through the tunnel?

alkor-istar avatar Jun 28 '18 14:06 alkor-istar

@alcarinque-istar I'm no expert know this, but I know that some ports are booth TCP AND UDP

jorys-paulin avatar Jun 28 '18 14:06 jorys-paulin

Bump on this!

steven200796 avatar Aug 14 '18 04:08 steven200796

@steven200796 I'm not expert into this; I'll probably need @cgutman's help on that bug

jorys-paulin avatar Aug 14 '18 06:08 jorys-paulin

try this

cainiaocome avatar Oct 06 '19 02:10 cainiaocome