配置更改

This commit is contained in:
刘河 2018-11-08 23:09:47 +08:00
parent 278292a51a
commit 5f8df0d581
2 changed files with 4 additions and 1 deletions

View File

@ -69,7 +69,9 @@ func EncodeResponse(r *http.Response) ([]byte, error) {
raw := bytes.NewBuffer([]byte{})
binary.Write(raw, binary.LittleEndian, []byte("sign"))
respBytes, err := httputil.DumpResponse(r, true)
respBytes = replaceHost(respBytes)
if config.Replace == 1 {
respBytes = replaceHost(respBytes)
}
if err != nil {
return nil, err
}

View File

@ -23,6 +23,7 @@ type Site struct {
type Config struct {
Server Server
SiteList []Site
Replace int
}
type JsonStruct struct {
}