A Multiplexing-Proxy used for async DomainStudio-Operations. It communicates over a single WebSocket with the DomainStudio and uses each frontend/client connection to redistribute the results, so that each client only receives messages that were produced by one of its own requests. The client can send unauthorized messages in JSON parsable format as ws-message to the proxy which will pass them on to the normal AutoDNS JSON API (authorized via the ProxyUser). These results are then fetched from the WS-Gate and transmitted to the client.
This Proxy can be used to authorize DomainStudio requests without sharing any credentials with the client.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You'll need working Docker and Docker-compose.
(To modify: Each container directory has its own requirements.txt file. Use Python3.9 and the requirements)
Create a .env file based on the example in the projects root directory after that, just use docker-compose:
docker-compose up --env <enf-file>
The client can connect to the proxy-url: ws://hostanme:port/dsws and will get its own message queue. Afterwards, the client can send a JSON parsable domainstudio-request as specified in: https://help.internetx.com/display/APIADDITIONALDE/DomainStudio+Guide For each request, the Client will be forwarded the direct REST response and will get the WebSocket-gates messages back. For example passing
{
"currency": "USD",
"searchToken": "house",
"sources": {
"recommended": {
"services": ["WHOIS"],
...
},
...
}
}
as a WebSocket message to the proxy will result in something like this coming back:
{
"stid": "20190702-stid",
"ctid": "myRequestID",
"data": [
{
"domain": "house.com",
"source": "RECOMMENDED",
"services": {
"whois": ...
}
},
...
]
}
Git clone and pip install all requirements. A Redis installation is necessary to test modifications, you can accomplish this by running just the Redis docker image.
cd Redis
docker build -t redis .
docker run -p 6379:6379 redis
Alternatively, just clone the project and run:
docker-compose up --build --force-recreate
To rebuild all containers after you changed something.
- Tornado - Tornado is a Python web framework and asynchronous networking library. By using non-blocking network I/O, Tornado can scale to tens of thousands of open connections, making it ideal for long polling, WebSockets, and other applications that require a long-lived connection to each user.
- Docker - Container Solution
- Redis - Message Broker
See also the list of contributors who participated in this project.
original redis-dockerfile: redis
original redisqueue implementation: redisqueue
