Comments (10)
Hi @fork04! Thanks for the issue! Do you have any ideas about how this information should be exposed/what type of APi semantics should be used? My immediate thought was to add it as part of the web handler and just have an APi key passed as part of the commandline. The endpoint would then just serve raw JSOn with the data
from sish.
Like the idea @fork04! We could even build a little web-based dashboard to poll and show the stats along the lines of https://demo.nginx.com/
@antoniomika, web handler sounds good to me. I think we would be best to start with:
- General stats
- List active tunnels
- Tunnel info
- Kill tunnel
My only slight concern with the others is that we will probably need to implement some data storage, which increases the general complexity a little. I guess we could just have some memory allocated to logs and just rotate them, although it raises the question of whether it should persist restarts.
from sish.
If someone wants to persist sish container logs , they can use docker "built-in" feature, for example:
docker run --log-driver syslog --log-opt syslog-address=udp://1.2.3.4:1111 [...]
from sish.
Yeah, of course. Are you thinking they should simply be output as per the current logging, as opposed to an API approach then?
from sish.
I think that the current loging system is sufficient, my proposal is rather to expand the application's operating parameters stored in memory, and make them available via API.
This data can later be used both as JSON from the console level and to build a simple web-based interface.
from sish.
I think we can actually get away with not needing a local datastore. My thought is we wouldn't store any requests as part of the stack and only stream those to any connected client. That would definitely make it less complex. The way I think this would work is as so:
- Websocket handler that streams requests in real time to the web client
- API methods to list and disconnect connections
- API handler at something like
/_sish/console
for each HTTP service. This would be protected by HTTP basic auth or a token created when the tunnel is made and then sent as output with all of the other tunnel output. - A global
/_sish/console
that can be used by thesish
service operator to see all of the connected services, all of the logs for each service, and the ability to disconnect clients or only select services for each client. This could be accessed by atoken
or httpbasic auth creds that are supplied at program runtime.
Love to hear your opinions on this. I have some downtime tomorrow that I think I could get a decent amount of this implemented.
from sish.
@antoniomika - for me, it`s great solution!
from sish.
@fork04 I have a PR up that implements the APIs necessary and the routes for the services. The "frontend" is extremely crude and is definitely not a production ready service, but it'll get the job done temporarily. I don't have time to work on a proper frontend, but if someone else is interested it is very easy to do. The docker image tag to play with the features is 1ceea74541767d659a91f1dd3257502134e25195
from sish.
Thanks for this PR @antoniomika!, in fact the interface needs some refinement but it doesn't look like much work to do. I will test the solution and propose corrections as far as I can.
from sish.
Thanks @fork04! Let's track things to fix on this issue. Something I found is that I need to fix gzip decoding when running behind a reverse proxy in my use on my production service.
from sish.
Related Issues (20)
- Login password to SSI.sh HOT 1
- The TCP port :443 is unavailable. HOT 1
- Use Case Remote Connection to repair system HOT 2
- Question about sish x nginx x websockets HOT 2
- sh -R 2222:localhost:22 ssi.sh Permission denied HOT 2
- 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
- [Feature-Request] - Record notes when starting a tunnel
- Multiple http/tcp ports on same subdomain HOT 3
- 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
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.