HeaderFaker
HeaderFaker is a simulation training ground to Help beginners learn about http protocol with answering some question.
Install
- Clone the repository from Github
git clone https://github.com/aURORA-JC/headerfaker.git
- Cd to project root path & build
go build
-
HeaderFaker will be build in the project root path
-
Install Mysql or MariaDB
Usage
- Files required to start the program
+ template/
+ data.json
+ config.ini
+ headerfaker
-
Import the database from
heakerfaker.sql
-
Modify the configuration file
config.ini
port = 9000
release = false
[mysql]
user =
password =
host =
port =
db = headerfaker
- Simple Start
# Set runnable power (Linux need)
sudo chmod +x ./headerfaker
# Start service
./headerfaker
# HeaderFaker will start on 0.0.0.0:9000
- systemd run
# Set runnable power (Linux need)
sudo chmod +x ./headerfaker
# add a new .service file in /lib/systemd/system
sudo vim /lib/systemd/system/headerfaker.service
# write & save content
[Unit]
Description=HeaderFaker Service
After=network.target
[Service]
Type=simple
User=nobody
Restart=on-failure
RestartSec=5s
ExecStart=<YOUR_HEADERFAKER_ABSOLUTE_PATH>
WorkingDirectory=<YOUR_HEADERFAKER_DIR_ABSOLUTE_PATH>
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target
# Or you can copy the .service file under the ./init dir
# Start the service
systemctl start headerfaker
# Set start at boot
systemctl enable headerfaker
Contributing
PRs accepted. But new branch is developing.
License
MIT © aURORA-JC
Author
John Chow (aURORA-JC)