-
Notifications
You must be signed in to change notification settings - Fork 352
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
Added simple HTTP API in order to obtain deeplinks #141
base: master
Are you sure you want to change the base?
Conversation
mike-lambert
commented
Sep 17, 2019
- Moved from Alpine to Ubuntu
- Added simple HTTP handler in order to obtain deeplinks by network, not by docker logs
- Port numbers moved to constants
- Added two new launch modes for fake TLS obfuscation
Thanks for the request. I see some issues with it:
|
OK, the objections according base image, single-threaded HTTP server, ENTRYPOINT instead of RUN, and unused variables are reasonable. Let discuss the rest of, and the use case.
Well, let me explain the use case. I use some software to make publicly available censorship circumvention services. After launch I need to obtain link, which clients should use in order to connect. There is three approaches:
I hope we could reach kind of agreement and close this PR in order to continue with discussed improvements and fixes. |
I would rather go fo "rebuilding" links outside of proxy itself. It's just 1 line of code and
actually even more reliable approach, because it works even for hosts with
many public IPs
ср, 18 сент. 2019 г., 8:15 Mike <[email protected]>:
… OK, the objections according base image, single-threaded HTTP server,
ENTRYPOINT instead of RUN, and unused variables are reasonable. Let discuss
the rest of, and the use case.
- The docker image is run as root user. Yes, but when we run image,
which contain all of intended files and maps nothing to host file system,
you shouldn't care about root - your software already bounded by container
and almost couldn't escape. Leaving executable on host and limiting
- Also, restarting by SIGUSR2 is misuse of docker concept IMHO.
Well, let me explain the use case. I use some software to make publicly
available censorship circumvention services.
Docker used as suitable deployment facility, as it has been designed -
configuration passed from management tool from host to container by
environment, software packed into image and running inside container
without any interaction with host files.
After launch I need to obtain link, which clients should use in order to
connect. There is three approaches:
1. Re-build link outside of container by provided configuration
parameters. This is not good due code duplication (the same facility also
exists in your code).
2. Parse container log. This is unreliable.
3. Get it from software running inside container somehow. That I tried
to implement in this PR. Yes, it make running server more visible, so
adding some kind of protection (i.e. auth token) is reasonable also.
*So, the main goal is making dockered implementation friendly to cloud
deployments for public use*
I hope we could reach kind of agreement and close this PR in order to
continue with discussed improvements and fixes.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#141?email_source=notifications&email_token=AADHA7RIMGZYKYOHVWYPY6DQKHBPXA5CNFSM4IXNTQPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD665WIQ#issuecomment-532536098>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADHA7SKV44PK5WD22DA7BDQKHBPXANCNFSM4IXNTQPA>
.
|
Handling multiple IPs already done by existing code. |
Recently I implemented http-interface to generate metrics for Prometheus. Now the link info can be also obtained using this interface. Example (strings to add in config.py):
The links can be obtained with: |
@alexbers How can I access to the http-interface by my PC? |
Just add your ip address in METRICS_WHITELIST and you will be able to access it with browser or curl. |
I added my IP to METRICS_WHITELIST. Then I tried to access it by my_server_ip:5555. But it didn't work. |
Please make sure that you are using the latest version from master branch |
I updated it 5 min ago |
Did you added these strings?
|
Yes. I can access it by curl in server. |
So everything is good now? |