Comments (3)
Just by design of sish, the server hosts both subdomains and ports. As long as the host name resolves to the same server, you can achieve what you want by doing a tcp forward for the 3001 port. Something like:
ssh -R dev:80:localhost:3000 -R 3001:localhost:3001 tuns.sh
Would likely work for you as long as the hot reload socket tries dev.tuns.sh:3001 as the websocket.
If that doesn't work and you're able to change the address the browser uses for the websocket, you can forward the socket at a path and that would work as well. Just note that path wouldn't be accessible by the main app.
from sish.
Indeed. Didn't actually think about wildcard pointing to the same host. Thanks for the clarification.
Though, this command has been giving me connection refused error, after updating my local Vite it is now possible to use HMR on the same port with dev server, however it kept reloading the page until I specified --idle-connection=false
in the CLI.
How would multi-tenancy be handled in that case?
For example, there are demo-page-1.tuns.sh
and demo-page-2.tuns.sh
tunneled from different machines, but both use 3001 for websocket.
from sish.
In that situation, you'd have to provide different ports. sish only treats 3 types of forwards as unique:
- http (80)
- https (443)
- SNI (443, or any other port you want)
sish doesn't have support for registering a multiplexing http server on every port, only on port 80 or 443. This has to do with tcp aliases as other port/hostname combos will turn into internal tunnels.
In your situation, you have a few options.
- Use different ports for the hot reloading middleware.
- Have sish forward a path to the port and configure the websocket url to use that path (example)
- Use SNI proxying and have the websocket hosted using TLS
I'll close this issue since it's use-case specific, but I'm happy to help here with anything.
from sish.
Related Issues (20)
- Panic with large body sizes HOT 6
- Usage guide via SSH HOT 1
- websocket connections will be closed once a while HOT 1
- Sish sometimes doesn't clean connections properly HOT 4
- Reconnect same tunnel HOT 1
- How many max connections it can hold? HOT 1
- sish SSH question
- Force reset connection HOT 10
- Certificate provisioning issues
- URL string replacement in the returned HTML HOT 1
- [Feature-Request] - Record notes when starting a tunnel
- Can I use IP configuration? I have no domain name
- channel 0: open failed: connect failed: Temporary failure in name resolution stdio forwarding failed
- Feature request: allow reading password from file HOT 3
- Run behind SSL terminating proxy HOT 1
- how to disable random subdomain. HOT 1
- Is it possible to run it in debain or openwrt running in Rasberry Pi HOT 7
- cannot get sish to work, connection refused or hangs HOT 1
- [Support] Where to start for adding authentication features HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sish.