Skip to content
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

[FEATURE] Implement specification spoof script for higher resolution and refresh rates #254

Open
HerrTiSo opened this issue Sep 23, 2024 · 4 comments

Comments

@HerrTiSo
Copy link

HerrTiSo commented Sep 23, 2024

According to @a9udn9u, there exists a workaround to intercept the browser's spec request via proxy before it's sent to GFN, to go for 1440P@120Hz instead.

https://gist.github.com/a9udn9u/85e0c8e863db85c5b62320766bd7b2e9#file-geforce-now-resolution-interceptor-py

Would love to hear if we could make this work in the Electron app.

@a9udn9u
Copy link

a9udn9u commented Sep 23, 2024

Not an Electron expert, but if it can work around Google's upcoming restriction on the webRequest blocking API, the request can be modified without a proxy server.

@SquiffyMcwhithers
Copy link

Made an account just to comment how much I would love to see this feature added in.

@HerrTiSo
Copy link
Author

push @hmlendea

@lordgreg
Copy link

lordgreg commented Nov 21, 2024

Hi. I am just testing this with Requestly. So far, without the success.

Rule 1 - Body update:

function modifyRequestBody(args) {
  const { method, url, body, bodyAsJson } = args;
  let newBody;
  newBody = bodyAsJson;
  
  try {
    console.log(">>>", newBody)
    let settings = newBody.sessionRequestData;
    // settings.clientIdentification = "GFN-PC";
    // settings.clientVersion = 29.0;
    // settings.sdkVersion = 2.0;
    // settings.streamerVersion = "14";
    // settings.clientPlatformName = "Windows";
    
    let monitorsettings = settings.clientRequestMonitorSettings[0]; 
    // monitorsettings.widthInPixels = 3440; 
    // monitorsettings.heightInPixels = 1440; 
    monitorsettings.widthInPixels = 2560; 
    monitorsettings.heightInPixels = 1440;
    monitorsettings.framesPerSecond = 120;
    console.log("Updating", settings)
  } catch (e) {
    console.log("Monitor data not found", newBody)
  }
  return newBody;
}

Rule 2 - Headers update

image

The result is still 60 FPS and max 1920x1200.

image

My monitor resolution is 3440 x 1440.
And, I've checked the Windows Browser version - you are limited to to the exact same resolution.
@a9udn9u - am I missing something?

Can you post your Body and Headers output that is being sent to server?

Here is the POST Request being sent from NATIVE Windows Client:

HEADERS

POST https://********************.cloudmatchbeta.nvidiagrid.net/v2/session?keyboardLayout=en-US&languageCode=en_US HTTP/1.1
Connection: Keep-Alive
Content-Type: text/plain
Authorization: GFNJWT ********************
User-Agent: GFN-PC/29.0 (Windows 10.0.22621) BifrostClientSDK/4.71 (35125156)
NV-Client-ID: ********************
NV-Client-Streamer: NVIDIA-CLASSIC
NV-Client-Type: NATIVE
NV-Client-Version: 2.0.68.154
NV-Device-Make: To Be Filled By O.E.M.
NV-Device-Model: To Be Filled By O.E.M.
NV-Device-OS: WINDOWS
NV-Device-Type: DESKTOP
X-Device-Id: ********************
x-nv-client-identity: GFN-PC/29.0 (Windows 10.0.22621) BifrostClientSDK/4.71 (35125156)
traceparent: ********************
Content-Length: 1897
Host: ********************cloudmatchbeta.nvidiagrid.net
Cookie: SERVERID=********************

BODY

{
  "sessionRequestData": {
    "audioMode": 2,
    "clientDisplayHdrCapabilities": null,
    "remoteControllersBitmap": 0,
    "sdrHdrMode": 0,
    "enhancedStreamMode": 0,
    "metaData": [
      {
        "key": "ClientImeSupport",
        "value": "0"
      },
      {
        "key": "SubSessionId",
        "value": "b481232b-6c24-4f4f-aeea-a5244dc83189"
      },
      {
        "key": "clientPhysicalResolution",
        "value": "{\"horizontalPixels\":3440,\"verticalPixels\":1440}"
      },
      {
        "key": "latency@********************.cloudmatchbeta.nvidiagrid.net",
        "value": "19"
      },
      {
        "key": "latency@********************.cloudmatchbeta.nvidiagrid.net",
        "value": "37"
      },
      {
        "key": "latency@********************.cloudmatchbeta.nvidiagrid.net",
        "value": "27"
      },
      {
        "key": "latency@********************.cloudmatchbeta.nvidiagrid.net",
        "value": "29"
      },
      {
        "key": "latency@********************.cloudmatchbeta.nvidiagrid.net",
        "value": "34"
      },
      {
        "key": "networkType",
        "value": "Ethernet"
      },
      {
        "key": "wssignaling",
        "value": "1"
      },
      {
        "key": "surroundAudioInfo",
        "value": "2"
      }
    ],
    "clientVersion": "29.0",
    "partnerCustomData": null,
    "deviceHashId": "********************",
    "userAge": ********************,
    "internalTitle": null,
    "clientPlatformName": "Windows",
    "requestedStreamingFeatures": {
      "enabledL4S": false,
      "reflex": false,
      "bitDepth": 1,
      "mouseMovementFlags": 0,
      "cloudGsync": false
    },
    "surroundAudioInfo": 0,
    "enablePersistingInGameSettings": true,
    "clientTimezoneOffset": ********************,
    "preferredController": 2,
    "clientIdentification": "GFN-PC",
    "parentSessionId": null,
    "appId": ********************,,
    "streamerVersion": "14",
    "clientRequestMonitorSettings": [
      {
        "monitorId": 0,
        "positionX": 0,
        "positionY": 0,
        "heightInPixels": 1440,
        "sdrHdrMode": 0,
        "displayData": null,
        "framesPerSecond": 120,
        "hdr10PlusGamingData": null,
        "dpi": 0,
        "widthInPixels": 3440
      }
    ],
    "availableSupportedControllers": [
      2
    ],
    "appLaunchMode": 1,
    "sdkVersion": "2.0",
    "networkTestSessionId": null,
    "useOps": true,
    "secureRTSPSupported": true,
    "accountLinked": false,
    "requestedAudioFormat": 0
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants