L
Size: a a a
L
N
L
L
N
DD
w
DD
АЛ
DD
proxy := httputil.NewSingleHostReverseProxy(url)и вот такой хандлер
unc(w http.ResponseWriter, r *http.Request) {
if r.Header.Get("CF-Connecting-IP") == "" {
ip, _, _ := net.SplitHostPort(r.RemoteAddr)
r.Header.Set("CF-Connecting-IP", ip)
}
proxy.ServeHTTP(w, r)
})
Н
cmd := exec.Command("python3", "app.py")
cmdReader, err := cmd.StdoutPipe()
if err != nil {
fmt.Println(err)
}
bufin := bufio.NewReader(cmdReader)
go func() {
for {
buf, err := bufin.ReadBytes('\n')
if err != nil {
fmt.Println(err)
break
}
fmt.Println(string(buf))
}
}()
err = cmd.Start()
if err != nil {
fmt.Println(err)
}
import time
for i in range(1, 5):
print(i)
time.sleep(0.5)
DP
с
с
DP