LambdaExpression / GatewayAuth

Gateway Auth / 网关登录工具

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gateway Auth

Go / React / Material-ui 网关登录工具

GitHub go.mod Go version GitHub repo size



Run

Download the version of the corresponding system

$ wget https://github.com/LambdaExpression/GatewayAuth/releases/download/v1.0.3/gatewayAuth_linux_amd64_1_0_3

$ chmod +x gatewayAuth_linux_amd64_1_0_3

$ ./gatewayAuth_linux_amd64_1_0_3 -h
Usage of ./gatewayAuth_linux_amd64_1_0_3:
  -c string
    	--c config file path / 配置文件路径 (default "./config")
    	
$ echo -e '[base]\nport = 8094\nproxySort=["test"]\n[proxy]\n    [proxy.test]\n    path = "/"\n    target = "http://127.0.0.1:80"\n    httpAuth = ["tom"]\n[auth]\n    [auth.test]\n    account = "test"\n    password = "123"' > ./config.toml

$ ./gatewayAuth_linux_amd64_1_0_3 -c ./config.toml
2021/11/01 16:13:16 {"Base":{"Port":8094,"ProxySort":["test","serverstatusws","serverstatus"]},"Proxy":{"serverstatus":{"Path":"/","Target":"http://127.0.0.1:35601","CacheMaxAge":0,"HttpAuth":["tom"],"WsAuth":null},"serverstatusws":{"Path":"/public","Target":"http://127.0.0.1:35601","CacheMaxAge":0,"HttpAuth":null,"WsAuth":["tom"]},"test":{"Path":"/test","Target":"http://127.0.0.1:80","CacheMaxAge":0,"HttpAuth":["tom"],"WsAuth":["tom"]}},"Auth":{"test":{"Account":"test","Password":"123"},"tom":{"Account":"tom","Password":"123"}}}
2021/11/01 16:13:16 listen : 8094

Config File

[base]     
port = 8094
# proxy execution order / 代理执行顺序
proxySort=["test","serverstatusws","serverstatus"]

# SSL certificate configuration, use http access when not configured / SSL证书配置,不配置时使用http访问
# sslCertificate = "ssl.crt"      # ssl certificate / SSL证书
# sslCertificateKey = "ssl.key"   # ssl certificate key / SSL证书私钥

[proxy]

    [proxy.test]
    path = "/test"
    target = "http://127.0.0.1:80"
    httpAuth = ["tom"]   # login account / 登录账号
    wsAuth = ["tom"]     # login account / 登录账号
    cacheMaxAge = 604800 # Log in the expiration time for seconds, and do not set the default 2 hours / 登陆过期时间秒,不设置默认2小时

    [proxy.serverstatusws]
    path = "/public"
    target = "http://127.0.0.1:35601"
    wsAuth = ["tom"]

    [proxy.serverstatus]
    path = "/"
    target = "http://127.0.0.1:35601"
    httpAuth = ["tom"]

[auth]
    
    # account and password / 账号密码
    [auth.tom]
    account = "tom"
    password = "123"

    [auth.test]
    account = "test"
    password = "123"

About

Gateway Auth / 网关登录工具

License:MIT License


Languages

Language:Go 49.7%Language:JavaScript 35.6%Language:HTML 6.1%Language:Shell 5.2%Language:CSS 3.3%