mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-09 10:41:39 +08:00
添加 profile name(用于区分不同网站的配置)
This commit is contained in:
@@ -137,7 +137,7 @@ func LinkAuth(w http.ResponseWriter, r *http.Request) {
|
||||
other := &dbdata.SettingOther{}
|
||||
_ = dbdata.SettingGet(other)
|
||||
rd := RequestData{SessionId: sess.Sid, SessionToken: sess.Sid + "@" + sess.Token,
|
||||
Banner: other.Banner, ProfileHash: profileHash}
|
||||
Banner: other.Banner, ProfileName: base.Cfg.ProfileName, ProfileHash: profileHash}
|
||||
w.WriteHeader(http.StatusOK)
|
||||
tplRequest(tpl_complete, w, rd)
|
||||
base.Debug("login", cr.Auth.Username, userAgent)
|
||||
@@ -175,6 +175,7 @@ type RequestData struct {
|
||||
SessionId string
|
||||
SessionToken string
|
||||
Banner string
|
||||
ProfileName string
|
||||
ProfileHash string
|
||||
}
|
||||
|
||||
@@ -227,7 +228,7 @@ var auth_complete = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<vpn-profile-manifest>
|
||||
<vpn rev="1.0">
|
||||
<file type="profile" service-type="user">
|
||||
<uri>/profile.xml</uri>
|
||||
<uri>/profile_{{.ProfileName}}.xml</uri>
|
||||
<hash type="sha1">{{.ProfileHash}}</hash>
|
||||
</file>
|
||||
</vpn>
|
||||
|
Reference in New Issue
Block a user