mailbase
login/register/logout/delete server with mail checking using go, redis and mysql
Images (must-view) ⬇️
Requirements
- redis-server:
6.2.0
(withGetDel
support) - Mysql:
8.0.28
(don't know accurate version, so use my as definitive) - Go:
1.18
- packages:
reffered to go.mod
Running
jwt cookies
HTTPS is required forThe config template is located in cmd folder
The config parser supports small variety of formats (you can implement new)
go run . -conf conf.toml -type toml
go run . -conf conf.json -type json
go run . -conf conf.yaml -type yaml
Logs are saved in log.txt
With Multiwriter outputs can be expanded to an unlimited count (io.Writer implemented)
log.SetOutput( multiwriter.NewMultiWriter(os.Stderr,fileWriter,otherWriter) )
HTTP mode:
jwt works bad without https
(depending on the browser)
Although, you can force it in the config file
[Host]
HTTP = true
Mail links
In the mails folder you ought to change mail message links
For instance, the default url is https://localhost:8080/api/verify?key=
With an unique site it would look like https://yoursite.com/api/verify?key=
Docker
Image connects to the local databases, --net=host
is required
To add execution arguments use the $ARGS
environment variable
Images
Session not found -> register/login
You must verify your mail:
Forgot password? Wait for mail
Then Reset
Welcome to main page
If you're admin, advanced link will appear
Let's write report HTML SUPPORTED
Admin panel
View reports:
Read and answer HTML SUPPORTED
:
Reporter will receive mail:
Status of report will be updated:
Let's disable server (admin panel wiil be available):
Ooops...
It would be better to fix this...
Superadmins who are granted from console can add/delete admins be theirs email or id
nojwt branch
The old unsecured server version works well with http
, but all cookies can be stolen easily
Another solution is to use ngrok and the like services to create http tunnel, which allow you to choose newer version with jwt
ngrok example for regions:
ngrok http -region=eu 8080
ngrok http -region=us 8080