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]: Change Web Socket Connect Address #348

Open
wslp12 opened this issue Oct 31, 2024 · 3 comments
Open

[Feature]: Change Web Socket Connect Address #348

wslp12 opened this issue Oct 31, 2024 · 3 comments

Comments

@wslp12
Copy link

wslp12 commented Oct 31, 2024

Describe the feature you'd like.

It operates normally in a local enviroment, but does not log when accessing a local address from a mobile device.

My guess is that the WebSocket connection address is 127.0.0.1, is there a way to fix this ?

-log file-
info host -----------starting---------
info extenstion hostpreocess output:port:[55880]
info extension
info host client connected: extension { address: '127.0.0.1', family: 'IPv4", 'port: 55880 }

  • local work ok
  • mobile device log not work

mobile device access no localhost
mobile device access some.test.com

some.test.com -> proxy -> 123.123.123.123 (in my public ipv4 )

@smcenlly
Copy link
Member

We mention in our README.md that:

To connect from a different host name, use the console-ninja.allowedHosts VS Code setting.

Have you tried that and it's not working for you?

@wslp12
Copy link
Author

wslp12 commented Nov 4, 2024

@smcenlly yes i tried - console-ninja.allowdHosts: ["*"] but not work..
----edit------
To add more details, my current situation is as follows

local pc

  • ip: 1.1.1.1
  • terminal: yarn dev (run nextjs server) 8080port
  • browser: access "some.com" not a localhost
    - click -> work fine

A server

  • nginx: "some.com" proxy to 1.1.1.1:8080

Mobile device with VPN

  • webview: access "some.com"
    - click -> not work

Save in my local vscode automatically updates the screen with changes on my mobile device

The reason I guess this is possible is because the Nextjs dev server communicates the work reflection to the http request server

Consolninza seems to be communicating by WebSocket, but I think we just need to change the request address,

Of course, I don't know about this in detail because I don't have network knowledge.. I'm also wondering if it's possible or not

@smcenlly
Copy link
Member

smcenlly commented Nov 4, 2024

We haven't set up your exact configuration before, but it should work for you.

Please note: the use of * and ? for wildcard matching (e.g. .example.com), and regular expressions (e.g. /^.\.example\.com$/) are PRO features, so if you are using the Community edition of Console Ninja, it won't work for you. If you do not have PRO, then you will need provide the explicit name of your host (e.g. some.com).

If you're still having problems, can you please provide us with your ~/.console-ninja/trace.log file, which is located in your home folder under a hidden .console-ninja folder?

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

No branches or pull requests

2 participants