New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Devices and ws-scrcpy on differents machines #255
Comments
Hi.
Shouldn't it be the other way around: listen on 15037 and proxy to 5037? |
Hi, thank you for your answer, I tried to configure the config.example.yaml file and set path to WS_SCRCPY_CONFIG variable but it doesn't work. And now my solution is to continue proxy the port 8001 or maybe 8002 in remote computer(10.0.56.12) in nginx because the tcp:8886 in device will be forwarded to tcp:8001 or tcp:8002
And it works, but it is a little bit inconvenient because i don't know the port 8001 or 8002 is fixed or not. Do you have any suggestion? |
hi |
Hello, thank you for the awesome project.
All is working perfectly in local computer.
I want to deploy it on the internet and i have a problem with it.
Now i have some Android devices connect to Windows machine which IP is 10.0.56.12, ws-scrcpy is running on another machine which IP is 10.0.54.34
I have used the nginx stream the adb server port 5037 to 15037 on the remote computer (10.0.56.12):
stream {
server {
listen 5037;
proxy_pass localhost:15037;
}
}
I changed the AdbExtended opts host to 10.0.56.12 and its port to 15037:
export class AdbExtended extends Adb {
static createClient(options: Options = {}): ExtendedClient {
const opts: ClientOptions = {
bin: options.bin,
host: options.host || process.env.ADB_HOST || '10.0.56.12',
port: options.port || 15037,
};
if (!opts.port) {
const port = parseInt(process.env.ADB_PORT || '', 10);
if (!isNaN(port)) {
opts.port = port;
} else {
opts.port = 5037;
}
}
return new ExtendedClient(opts);
}
}
when i opened the browser, i still get the device list but i can not access to the stream (error: [StreamReceiver] WS closed: connect ECONNREFUSED 127.0.0.1:8002)
The text was updated successfully, but these errors were encountered: