Skip to content

Instantly share code, notes, and snippets.

@a9udn9u
Last active November 3, 2025 00:01
Show Gist options
  • Select an option

  • Save a9udn9u/85e0c8e863db85c5b62320766bd7b2e9 to your computer and use it in GitHub Desktop.

Select an option

Save a9udn9u/85e0c8e863db85c5b62320766bd7b2e9 to your computer and use it in GitHub Desktop.
GeForce Now 1440P on Linux Chrome
import json
import re
from mitmproxy import http
url_pattern = re.compile(r"^.*\.nvidiagrid.net/v2/session")
user_agent_pattern = re.compile(r"(Mozilla\/[\d\.]+) \(.+?\)")
def request(flow: http.HTTPFlow) -> None:
# Check if the request matches the regex pattern
if url_pattern.match(flow.request.pretty_url):
flow.request.headers['nv-device-os'] = 'WINDOWS'
flow.request.headers['sec-ch-ua-platform'] = '"WINDOWS"'
flow.request.headers['sec-ch-ua-platform-version'] = '14.0.0'
if "user-agent" in flow.request.headers:
flow.request.headers["user-agent"] = user_agent_pattern.sub(
r'\1 (Windows NT 10.0; Win64; x64)',
flow.request.headers["user-agent"])
if flow.request.headers.get("content-type") == "application/json":
try:
body = json.loads(flow.request.content)
if body.get("sessionRequestData", {}).get("clientRequestMonitorSettings", None) is not None:
body["sessionRequestData"]["clientRequestMonitorSettings"] = [
{
"heightInPixels": 1440,
"framesPerSecond": 120,
"widthInPixels": 2560
}
]
flow.request.content = json.dumps(body).encode("utf-8")
except json.JSONDecodeError:
pass
function FindProxyForURL(url, host) {
var proxy = "PROXY <your proxy server IP>:<your proxy server port>";
if (/^https:\/\/.+\.nvidiagrid.net/.test(url)) {
// Should only proxy /v2/session, but the URL path is removed by Chrome
return proxy;
}
return "DIRECT";
}
@FossPrime
Copy link

FossPrime commented Oct 13, 2025

https://chromewebstore.google.com/detail/modify-http-header/pefdbdgalcpplfidblkgpjlpggfepipd

Also works... .*\.(geforcenow\.com)|(nvidia\.com)|(nvidiagrid\.net)|(geforce\.com)
Screenshot From 2025-10-13 16-31-40

This leads to a playable 1440p at 45mbps... at 75mbps the input latency is rediculously high. On the same machine with wIndows, I can comfortably run 100mbps, strange as the fast.com loaded latency speed tests are very close between OSs. I tried Proton unsuccessfully.

@kubrickfr
Copy link

@FossPrime the reason why you're seeing high input latency is most likely because you don't have hardware acceleration.
See my previous comments: this one, that one

Nice that we don't need mitmproxy any more!

@fobiat
Copy link

fobiat commented Oct 15, 2025

https://chromewebstore.google.com/detail/modify-http-header/pefdbdgalcpplfidblkgpjlpggfepipd

Also works... .*\.(geforcenow\.com)|(nvidia\.com)|(nvidiagrid\.net)|(geforce\.com) Screenshot From 2025-10-13 16-31-40

This leads to a playable 1440p at 45mbps... at 75mbps the input latency is rediculously high. On the same machine with wIndows, I can comfortably run 100mbps, strange as the fast.com loaded latency speed tests are very close between OSs. I tried Proton unsuccessfully.

Any chance you could share more info on what you put on the headers? I've added "Chrome OS" & "CHROMEOS" but unable to identify the others but t;s not currently working thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment