grass icon indicating copy to clipboard operation
grass copied to clipboard

Handle new action "OPEN_TUNNEL"

Open tructhienbui opened this issue 1 year ago • 7 comments

They just present new action to the websocket call OPEN_TUNNEL.

This also make the script crashing with exception include "method" this is because the request_data does not contain the method any more.

I think that they change the regular HTTP_REQUEST action into another tunnel connection.

`09:47:24.46 INFO 1 | Connected {'id': 'KJI2JJLFCroN6NpFXfhDr', 'action': 'OPEN_TUNNEL', 'data': {'url': 'https://api.getgrass.io/somethign/something'}} {'url': 'https://api.getgrass.io/something/something'}

tructhienbui avatar Dec 18 '24 02:12 tructhienbui

The initial fix doesn't seem to hard. It appears to return the same data as the url in "HTTP_REQUEST" which looks like this

{"code":"'abcdefghijk'"}

The big question is what does the server expect to see? with "HTTP_REQUEST" the server was expecting somthing like this from the client

{ "id": "12345", "origin_action": "HTTP_REQUEST", "result": { "body": "example_encoded_body_as_str", "headers": { "Content-Type": "application/json", "Cache-Control": "no-cache" }, "status": 200, "status_text": "OK", "url": "https://example.com/api" } }

With OPEN_TUNNEL the server could be expecting something different

milkthecow-moo avatar Dec 18 '24 05:12 milkthecow-moo

Yeah i tried to debug on extensions but seem they dont return OPEN TUNNEL for extensions, so basically be careful. Only way to know is debug the desktop app it-self

tructhienbui avatar Dec 18 '24 05:12 tructhienbui

Yeah and that is hard. The app has SSL pining and I'm not knowledgeable enough to know how to remove it

milkthecow-moo avatar Dec 18 '24 08:12 milkthecow-moo

Haven't found a solution to the problem yet?

FiNT222 avatar Dec 20 '24 11:12 FiNT222

I tried to capture the package, but the desktop could not find the websocket package

AuroraXing avatar Dec 20 '24 14:12 AuroraXing

Can somebody make push request that I add it to bot?

MsLolita avatar Dec 21 '24 12:12 MsLolita

Haven't found a solution to the problem yet? Still waiting for it.

Natmat626 avatar Dec 27 '24 09:12 Natmat626