1
0
mirror of https://github.com/IceWhaleTech/CasaOS.git synced 2025-07-15 23:54:17 +02:00

Determine the hole punching technique

This commit is contained in:
link
2022-02-28 14:14:39 +08:00
parent 892eef424c
commit 28c1a52171
11 changed files with 347 additions and 24 deletions

View File

@ -16,9 +16,9 @@ import (
//url:请求地址
//response:请求返回的内容
func Get(url string, head map[string]string) (response string) {
client := http.Client{Timeout: 30 * time.Second}
client := &http.Client{Timeout: 30 * time.Second}
req, err := http.NewRequest("GET", url, nil)
req.BasicAuth()
for k, v := range head {
req.Header.Add(k, v)
}