Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: web support http basic authorization #170

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Conversation

monkeyWie
Copy link
Member

related: #146 #128 #117

@monkeyWie monkeyWie added the enhancement New feature or request label Jul 27, 2023
@monkeyWie monkeyWie merged commit 81518d7 into main Jul 27, 2023
3 checks passed
@monkeyWie monkeyWie deleted the feat/basic_auth branch July 28, 2023 13:59
@monkeyWie
Copy link
Member Author

通过命令行参数开启身份认证:

./gopeed -u gopeed -p xxx

或者通过指定配置文件启动:

./gopeed -c config.json
  • config.json
{
  "address":"127.0.0.1",
  "port":8888,
  "username": "gopeed",
  "password": "xxx"
}

输入-h参数查看更多参数说明:

./gopeed -h
Usage of C:\Users\liwei\Downloads\gopeed-web-v1.3.8-windows-amd64\gopeed.exe:
  -A string
        Bind Address (default "0.0.0.0")
  -P int
        Bind Port (default 9999)
  -T string
        API token, that can only be used when basic authentication is enabled.
  -c string
        Config file path (default "./config.json")
  -p string
        HTTP Basic Auth Password
  -u string
        HTTP Basic Auth Username (default "gopeed")

同理通过docker启动时也可以加上命令行参数开启身份认证:

docker run -d -p 9999:9999 -v /path/to/download:/root/Downloads liwei2633/gopeed -u gopeed -p xxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant