update go/tg/l2.go add changes lang

This commit is contained in:
root 2026-07-17 13:52:50 +03:00
parent c1c29f3d73
commit 58a11d7e82
2 changed files with 4 additions and 1 deletions

View file

@ -28,6 +28,9 @@ func ProxyCheck(proxy string) (bool, string, string, string) {
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
} }
err = godotenv.Load()
lang := os.Getenv("langl2")
url := "http://ip-api.com/json?lang=" + lang
transport := &http.Transport{ transport := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
Proxy: http.ProxyURL(proxyurl), Proxy: http.ProxyURL(proxyurl),
@ -36,7 +39,7 @@ func ProxyCheck(proxy string) (bool, string, string, string) {
Transport: transport, Transport: transport,
Timeout: 20 * time.Second, Timeout: 20 * time.Second,
} }
req, err := http.NewRequest("GET", "http://ip-api.com/json", nil) req, err := http.NewRequest("GET", url, nil)
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
} }

Binary file not shown.