Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Nephos/http_distributor
http server which allows sneaky http request though it.
https://github.com/Nephos/http_distributor
Last synced: about 1 month ago
JSON representation
http server which allows sneaky http request though it.
- Host: GitHub
- URL: https://github.com/Nephos/http_distributor
- Owner: Nephos
- License: gpl-3.0
- Created: 2016-06-28T18:00:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-13T13:42:51.000Z (over 7 years ago)
- Last Synced: 2024-08-03T17:13:06.019Z (4 months ago)
- Language: Crystal
- Homepage:
- Size: 67.4 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - http_distributor - HTTP server which allows sneaky http requests (HTTP)
README
# http_distributor
http server which allows sneaky http request though it.
## Installation [![travis](https://travis-ci.org/Nephos/http_distributor.svg)](https://travis-ci.org/Nephos/http_distributor)
Be sure you have ``crystal > 0.18``
```sh
crystal deps
crystal compile ./src/http_distributor --release
```## Deploy on heroku
according to [crystal-lang.org](https://crystal-lang.org/2016/05/26/heroku-buildpack.html)
```sh
cd http_distributor/
heroku create --buildpack https://github.com/crystal-lang/heroku-buildpack-crystal.git
git push heroku master
```## Usage
### Start
```sh
./http_distributor [--port=PORT]
```### Configuration
#### Environment variables
- ``change_agent_probability``
- ``wait_fixed``
- ``wait_random_min`` and ``wait_random_max``
- ``wait_delay_coefficient``### Routes
- ``/get/url_base64_encoded``
- ``/config``
- ``/domains``
- ``/ping``### Important
You need an authentication token to do any request.
This token may be specified in an environment variable ``AUTH_TOKEN``.
If the token is not specified, it is automatically created when the server
starts, randomly, and wrote on the stderr.The auth token must be specified in query parameter.
Example: ``/get/xxx?auth_token=xxx``## Development
The project is divided in 3 parts.
### Proxy
This directory contains the http rules, and use Kemal.### Helpers
This part contains only the helper used by the proxy part.### http_distributor
This is the main library. It contains every important classes oft he project.## Contributing
1. Fork it ( https://github.com/Nephos/http_distributor/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request## Contributors
- [Nephos](https://github.com/Nephos) Arthur Poulet - creator, maintainer