Initial 423down proxy service
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import "time"
|
||||
|
||||
// 应用运行所需的固定配置。
|
||||
const (
|
||||
dbPath = "./db"
|
||||
listenAddr = ":18089"
|
||||
publicListenAddr = "0.0.0.0:18089"
|
||||
articleURLFormat = "https://www.423down.com/%s.html"
|
||||
loginURL = "https://www.423down.com/wp-login.php"
|
||||
articleCacheTTL = 3 * time.Hour
|
||||
cookieCacheTTL = 7 * 24 * time.Hour
|
||||
)
|
||||
|
||||
// 源站请求所需的默认请求头配置。
|
||||
const (
|
||||
defaultUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.7727.56 Safari/537.36"
|
||||
)
|
||||
|
||||
// 登录账号从环境变量读取,避免在代码中保存敏感信息。
|
||||
const (
|
||||
loginUserEnv = "423DOWN_USER"
|
||||
loginPasswordEnv = "423DOWN_PASSWORD"
|
||||
)
|
||||
Reference in New Issue
Block a user