-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5b213c
commit b1ef406
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,32 @@ | |
- [pixiv](https://pixiv.net) | ||
- [twitch](https://twitch.tv) | ||
|
||
可在配置文件中添加更多网站 | ||
可在[配置文件](#配置文件)中添加更多网站 | ||
|
||
## How to use | ||
**安装ssl根证书** | ||
|
||
证书文件`ca.crt` | ||
|
||
**运行snimap** | ||
|
||
授予执行权限 | ||
|
||
### windows | ||
以管理员方式运行 | ||
|
||
### linux | ||
使用`sudo` | ||
|
||
*注意此时的配置文件在root用户目录内* | ||
|
||
或者使用`setcap`授予更小粒度的权限 ([capabilities](https://man7.org/linux/man-pages/man7/capabilities.7.html)) | ||
``` | ||
$ sudo setcap 'cap_dac_override+ep cap_net_bind_service=+ep' ./target/release/snimap | ||
``` | ||
完成后即可用非root用户运行 | ||
|
||
## 配置文件 | ||
|
||
**配置文件位置** | ||
|
||
|
@@ -85,8 +110,9 @@ sni = "www.fanbox.cc" | |
## How to Build | ||
On OpenSUSE | ||
```bash | ||
$ git clone [email protected]:shanmiteko/snimap.git --depth=1 | ||
$ cargo build --release | ||
$ sudo zypper install libcap2 | ||
$ sudo setcap 'CAP_DAC_OVERRIDE+ep cap_net_bind_service=+ep' ./target/release/snimap | ||
$ cargo run | ||
$ sudo setcap 'cap_dac_override+ep cap_net_bind_service=+ep' ./target/release/snimap | ||
$ cargo run --release | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters