Skip to content

can't connect to the server via localhost #202

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

Closed
shadirvan opened this issue Jun 18, 2024 · 3 comments · Fixed by #213
Closed

can't connect to the server via localhost #202

shadirvan opened this issue Jun 18, 2024 · 3 comments · Fixed by #213
Labels
enhancement New feature or request

Comments

@shadirvan
Copy link

sometimes I would like to connect to the server by enabling ssh tunnel for security when running locally and map it 127.0.0.1. But the app won't let me connect to the localhost(127.0.0.1)

@ShiftHackZ ShiftHackZ added the enhancement New feature or request label Jul 28, 2024
@ShiftHackZ ShiftHackZ linked a pull request Jul 28, 2024 that will close this issue
3 tasks
@ShiftHackZ
Copy link
Owner

Hi, thanks for pointing this out, I did not think about ssh tunneling use case.

Connection to localhost was restricted because of many unfair 1-star reviews on Google Play from users who just saw 127.0.0.1 in the automatic logs, used that in app and were complaining that app is not working properly.

Now we are working on allowing the localhost connections and showing a warning dialog to user.

@KintCark
Copy link

If I'm correct don't you have to put --listen and --port 8888 on the automatic1111 machine then on the phone when u go put in the URL I put in 1.2.7.0.0.1:8888 like that? Correct me if I'm wrong. People are just putting 127001 and not the port

@ShiftHackZ
Copy link
Owner

In that case you still have to put --api and --listen, but also setup SSH server on your machine.
Than you can use something like termux to setup port tunneling on phone, for example ssh user@server -L 8888:localhost:7860, then having termux running and minimized use http://127.0.0.1:8888 in SDAI app.
This allows you not to expose port 7860 to public and connect to A1111 instance outside of your LAN (as long as you have access to SSH remotely).

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

Successfully merging a pull request may close this issue.

3 participants