Skip to content

Commit

Permalink
feat: add url
Browse files Browse the repository at this point in the history
  • Loading branch information
tscuite committed Mar 24, 2023
1 parent 097d2f4 commit fd59916
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xray/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ func (engine *Engine_Xray) EngineXray(agent string, connection []model.Connectio
dtmark := connection[i].Request.Header.Get("dt-mark-header")
url := connection[i].Request.URL.String()
if strings.Contains(url, "?") {
URL_arr := strings.Split(agent, "?")
URL_arr := strings.Split(url, "?")
xray.Urls = append(xray.Urls, URL_arr[0])
} else {
xray.Urls = append(xray.Urls, url)
}
//增加url切割,如果有?只要?前面的
if agent == "" {
config.Log.Printf("找不到 Dt-Request-Id 请求头")
xray.AgentID = AgentID
Expand Down

0 comments on commit fd59916

Please sign in to comment.