This application provides HTTP server, that can generate script for RouterOS-based routers for blocking "AD" hosts.
More information can be found here.
Previous version (PHP) can be found in
php-version
branch.
For local application starting using binary file, you must compile application (after repository cloning) using GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o ./mikrotik-hosts-parser .
or make build
, and then execute:
$ ./mikrotik-hosts-parser serve \
--config ./serve.yml \
--listen 0.0.0.0 \
--port 8080 \
--resources-dir ./public
This command will start HTTP server using configuration from ./serve.yml
on port 8080
and use directory ./public
for serving static files. Configuration file well-documented, so, feel free to change any settings on your choice!
Configuration file allows you to use environment variables with default values!
After that you can navigate your browser to http://127.0.0.1:8080/
and you will see something like that:
Special endpoint /script/source?sources_urls=...
generates RouterOS-based script using passed http-get parameters (watch examples on index page).
Just execute in your terminal:
$ docker run --rm -p 8080:8080/tcp tarampampam/mikrotik-hosts-parser:X.X.X
Where X.X.X
is image tag (application version). All available docker image tags can be found here.
I can't guarantee that this links will available forever, but you can use this application on following links:
For application testing we use built-in golang testing feature and docker-ce
+ docker-compose
as develop environment. So, just write into your terminal after repository cloning:
$ make test
Changes log can be found here.
If you will find any package errors, please, make an issue in current repository.
This is open-sourced software licensed under the MIT License.