🐛 fix 123pan 403

This commit is contained in:
微凉
2021-12-19 20:32:47 +08:00
parent d00f75c814
commit 731dbf6c3a
12 changed files with 68 additions and 55 deletions

View File

@ -30,7 +30,7 @@ func Down(c *gin.Context) {
Proxy(c)
return
}
link, err := driver.Link(base.Args{Path: path}, account)
link, err := driver.Link(base.Args{Path: path, IP: c.ClientIP()}, account)
if err != nil {
common.ErrorResp(c, err, 500)
return
@ -71,6 +71,7 @@ func Proxy(c *gin.Context) {
c.Redirect(302, link)
return
}
// 对于中转不需要重设IP
link, err := driver.Link(base.Args{Path: path}, account)
if err != nil {
common.ErrorResp(c, err, 500)