[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-post-de-rotierende-proxies-in-colly":3},{"success":4,"payload":5,"related":60,"errors":154},true,{"id":6,"slug":7,"title":8,"excerpt":9,"body_html":10,"meta_title":11,"meta_description":12,"canonical_url":13,"canonical_override":14,"og_title":15,"og_description":12,"og_image_url":16,"faq_json":17,"key_takeaways":14,"allow_index":27,"noindex_google_only":27,"allow_follow":4,"published_at":28,"updated_at":28,"content_updated_at":29,"featured_image_url":30,"featured_image_alt":31,"card_image_url":32,"reading_time_minutes":33,"author":34,"categories":38,"tags":45,"alternates":46,"locale_paths":58,"views":59},175,"rotierende-proxies-in-colly","Rotierende Proxies in Colly: Ein Go-Entwickler-Leitfaden für Proxy-Rotation","Praktischer Leitfaden zur Integration rotierender Proxys in Colly mit ProxyHat: RoundRobinProxySwitcher, benutzerdefinierte Proxy-Funktionen, Residential IPs, Retries und Produktionsmuster für verteiltes Scraping.","\u003Ch2>Rotierende Proxys in Colly: Warum und wie Go-Entwickler sie einsetzen\u003C\u002Fh2>\n\u003Cp>Wenn Sie mit \u003Cstrong>Colly\u003C\u002Fstrong>, dem beliebten Go-Web-Scraping-Framework, hochvolumige Datenextraktion betreiben, stoßen Sie unweigerlich auf IP-basierte Ratenlimits und Anti-Bot-Systeme. Rotierende Proxys in Colly sind die idiomatische Antwort: Anstatt Tausende Requests von einer einzigen IP zu senden, verteilen Sie die Last über ein Pool von Residential- oder Datacenter-IPs. Dieser Leitfaden zeigt, wie Sie Collys Erweiterungspunkte — \u003Ccode>SetProxyFunc\u003C\u002Fcode>, \u003Ccode>RoundRobinProxySwitcher\u003C\u002Fcode>, \u003Ccode>Limit()\u003C\u002Fcode> und Storage-Backends — korrekt nutzen, um einen produktionsreifen Scraper mit ProxyHat-Residential-Proxys zu bauen.\u003C\u002Fp>\n\u003Cp>Bevor wir in den Code einsteigen, ein rechtlicher Hinweis: Scraping öffentlich zugänglicher Daten ist in vielen Jurisdiktionen zulässig, aber Sie müssen \u003Ccode>robots.txt\u003C\u002Fcode> respektieren, die Nutzungsbedingungen (ToS) der Zielseite prüfen und bei personenbezogenen Daten die \u003Ca href=\"https:\u002F\u002Fgdpr.eu\u002F\" rel=\"noopener noreferrer\">DSGVO\u003C\u002Fa> beachten. In den USA kann unbefugter Zugriff nach dem Computer Fraud and Abuse Act (CFAA) strafbar sein. Dieser Artikel behandelt ausschließlich öffentlich verfügbare Daten und ethisches Scraping-Verhalten.\u003C\u002Fp>\n\n\u003Ch2>Collys Collector-Modell: Callbacks, Async und goquery\u003C\u002Fh2>\n\u003Cp>Colly basiert auf einem \u003Cem>Collector\u003C\u002Fem>-Objekt, das HTTP-Requests ausführt und über Callbacks DOM-Elemente an Handler weitergibt. Die Kern-Callbacks sind:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>OnRequest(func(*colly.Request))\u003C\u002Fstrong> — wird vor jedem Request aufgerufen; ideal zum Setzen von Headern oder zur Proxy-Auswahl.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>OnHTML(goquerySelector, func(*colly.HTMLElement))\u003C\u002Fstrong> — feuert, wenn ein CSS-Selektor matcht; das \u003Ccode>HTMLElement\u003C\u002Fcode> wrappt \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FPuerkitoBio\u002Fgoquery\" rel=\"noopener noreferrer\">goquery\u003C\u002Fa> für DOM-Traversierung.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>OnError(func(*colly.Response, error))\u003C\u002Fstrong> — wird bei HTTP-Fehlern oder Parse-Fehlern aufgerufen; hier setzen Sie Retry-Logik an.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>OnResponse(func(*colly.Response))\u003C\u002Fstrong> — feuert nach jeder erfolgreichen Response, vor OnHTML.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Im asynchronen Modus (\u003Ccode>c.Async = true\u003C\u002Fcode>) führt Colly Requests parallel aus, was den Durchsatz drastisch erhöht — aber nur, wenn Ihr Proxy-Pool groß genug ist. Mit \u003Ccode>c.Limit()\u003C\u002Fcode> steuern Sie Parallelität und Verzögerung, was für Proxy-Rotation essenziell ist.\u003C\u002Fp>\n\n\u003Ch3>Grundlegendes Collector-Setup\u003C\u002Fh3>\n\u003Cpre>\u003Ccode>package main\n\nimport (\n    &quot;fmt&quot;\n    &quot;log&quot;\n    &quot;github.com\u002Fgocolly\u002Fcolly\u002Fv2&quot;\n)\n\nfunc main() {\n    c := colly.NewCollector(\n        colly.UserAgent(&quot;Mozilla\u002F5.0 (compatible; ResearchBot\u002F1.0)&quot;),\n        colly.MaxDepth(2),\n    )\n\n    c.OnHTML(&quot;h1&quot;, func(e *colly.HTMLElement) {\n        fmt.Println(&quot;Title:&quot;, e.Text)\n    })\n\n    c.OnError(func(r *colly.Response, err error) {\n        log.Printf(&quot;Fehler bei %s: %v&quot;, r.Request.URL, err)\n    })\n\n    c.OnRequest(func(r *colly.Request) {\n        log.Println(&quot;Visiting:&quot;, r.URL.String())\n    })\n\n    if err := c.Visit(&quot;https:\u002F\u002Fexample.com&quot;); err != nil {\n        log.Fatal(err)\n    }\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Ch2>Die idiomatische Proxy-Schnittstelle: SetProxyFunc und RoundRobinProxySwitcher\u003C\u002Fh2>\n\u003Cp>Colly bietet zwei Wege, Proxys zu konfigurieren. Der einfache Weg ist \u003Ccode>c.SetProxy(urlString)\u003C\u002Fcode> für einen statischen Proxy. Für Rotation nutzen Sie \u003Ccode>c.SetProxyFunc(func(*http.Request) (*url.URL, error))\u003C\u002Fcode> — eine Funktion, die für jeden Request dynamisch eine Proxy-URL zurückgibt. Colly liefert mit \u003Ccode>proxy.RoundRobinProxySwitcher\u003C\u002Fcode> eine fertige Implementierung, die Round-Robin über eine Liste von Proxy-URLs macht.\u003C\u002Fp>\n\n\u003Ch3>RoundRobinProxySwitcher mit ProxyHat\u003C\u002Fh3>\n\u003Cp>Die einfachste Form der Rotation: Sie übergeben mehrere ProxyHat-URLs mit verschiedenen Session-IDs an den Switcher. Jeder Request nutzt automatisch die nächste URL.\u003C\u002Fp>\n\u003Cpre>\u003Ccode>package main\n\nimport (\n    &quot;log&quot;\n    &quot;github.com\u002Fgocolly\u002Fcolly\u002Fv2&quot;\n    &quot;github.com\u002Fgocolly\u002Fcolly\u002Fv2\u002Fproxy&quot;\n)\n\nfunc main() {\n    c := colly.NewCollector()\n\n    \u002F\u002F ProxyHat Residential Proxys mit verschiedenen Sessions\n    proxies := []*url.URL{\n        \u002F\u002F Format: http:\u002F\u002Fuser-sid-abc123:pass@gate.proxyhat.com:8080\n        mustParse(&quot;http:\u002F\u002Fuser-sid-sess01:pass@gate.proxyhat.com:8080&quot;),\n        mustParse(&quot;http:\u002F\u002Fuser-sid-sess02:pass@gate.proxyhat.com:8080&quot;),\n        mustParse(&quot;http:\u002F\u002Fuser-sid-sess03:pass@gate.proxyhat.com:8080&quot;),\n        mustParse(&quot;http:\u002F\u002Fuser-sid-sess04:pass@gate.proxyhat.com:8080&quot;),\n        mustParse(&quot;http:\u002F\u002Fuser-sid-sess05:pass@gate.proxyhat.com:8080&quot;),\n    }\n\n    rp, err := proxy.RoundRobinProxySwitcher(proxies...)\n    if err != nil {\n        log.Fatal(err)\n    }\n    c.SetProxyFunc(rp)\n\n    c.OnHTML(&quot;title&quot;, func(e *colly.HTMLElement) {\n        log.Println(&quot;Page:&quot;, e.Text)\n    })\n\n    c.Visit(&quot;https:\u002F\u002Fhttpbin.org\u002Fip&quot;)\n}\n\nfunc mustParse(raw string) *url.URL {\n    u, err := url.Parse(raw)\n    if err != nil {\n        panic(err)\n    }\n    return u\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Ch3>Benutzerdefinierte Proxy-Funktion: Geo-Targeting pro Request\u003C\u002Fh3>\n\u003Cp>Für fortgeschrittene Szenarien — etwa Geo-Targeting pro Request oder Sticky Sessions mit deterministischer Zuordnung — schreiben Sie eine eigene \u003Ccode>func(*http.Request) (*url.URL, error)\u003C\u002Fcode>. Hier rotieren wir Land und Stadt im Benutzernamen:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>package main\n\nimport (\n    &quot;math\u002Frand&quot;\n    &quot;net\u002Fhttp&quot;\n    &quot;net\u002Furl&quot;\n    &quot;sync&quot;\n    &quot;github.com\u002Fgocolly\u002Fcolly\u002Fv2&quot;\n)\n\nvar (\n    countries = []string{&quot;DE&quot;, &quot;US&quot;, &quot;GB&quot;, &quot;FR&quot;, &quot;IT&quot;}\n    cities    = map[string][]string{\n        &quot;DE&quot;: {&quot;berlin&quot;, &quot;munich&quot;, &quot;hamburg&quot;},\n        &quot;US&quot;: {&quot;new_york_city&quot;, &quot;chicago&quot;, &quot;los_angeles&quot;},\n        &quot;GB&quot;: {&quot;london&quot;, &quot;manchester&quot;, &quot;birmingham&quot;},\n        &quot;FR&quot;: {&quot;paris&quot;, &quot;lyon&quot;, &quot;marseille&quot;},\n        &quot;IT&quot;: {&quot;rome&quot;, &quot;milan&quot;, &quot;naples&quot;},\n    }\n    regions   = map[string]string{\n        &quot;berlin&quot;: &quot;state_of_berlin&quot;, &quot;munich&quot;: &quot;bayern&quot;, &quot;hamburg&quot;: &quot;hamburg&quot;,\n        &quot;new_york_city&quot;: &quot;new_york&quot;, &quot;chicago&quot;: &quot;illinois&quot;, &quot;los_angeles&quot;: &quot;california&quot;,\n        &quot;london&quot;: &quot;england&quot;, &quot;manchester&quot;: &quot;england&quot;, &quot;birmingham&quot;: &quot;england&quot;,\n        &quot;paris&quot;: &quot;ile_de_france&quot;, &quot;lyon&quot;: &quot;rhonealpes&quot;, &quot;marseille&quot;: &quot;provence_alpes_cote_dazur&quot;,\n        &quot;rome&quot;: &quot;lazio&quot;, &quot;milan&quot;: &quot;lombardy&quot;, &quot;naples&quot;: &quot;campania&quot;,\n    }\n    counter int\n    mu      sync.Mutex\n)\n\nfunc geoProxyFunc(r *http.Request) (*url.URL, error) {\n    mu.Lock()\n    country := countries[counter%len(countries)]\n    citySlice := cities[country]\n    city := citySlice[counter%len(citySlice)]\n    region := regions[city]\n    sessionID := fmt.Sprintf(&quot;sess-%d&quot;, counter)\n    counter++\n    mu.Unlock()\n\n    \u002F\u002F Username-Format: user-country-DE-region-state_of_berlin-city-berlin-sid-sess-42\n    raw := fmt.Sprintf(\n        &quot;http:\u002F\u002Fuser-country-%s-region-%s-city-%s-sid-%s:pass@gate.proxyhat.com:8080&quot;,\n        country, region, city, sessionID,\n    )\n    return url.Parse(raw)\n}\n\nfunc main() {\n    c := colly.NewCollector(\n        colly.MaxDepth(3),\n    )\n    c.SetProxyFunc(geoProxyFunc)\n\n    c.Limit(&amp;colly.LimitRule{\n        DomainGlob:  &quot;*&quot;,\n        Parallelism: 20,\n        Delay:       500 * time.Millisecond,\n    })\n\n    c.OnHTML(&quot;h1&quot;, func(e *colly.HTMLElement) {\n        log.Printf(&quot;[%s] %s&quot;, e.Request.Ctx.Get(&quot;proxy_country&quot;), e.Text)\n    })\n\n    c.Visit(&quot;https:\u002F\u002Fexample.com&quot;)\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Ch2>Warum Residential IPs für harte Ziele nötig sind\u003C\u002Fh2>\n\u003Cp>Datacenter-IPs sind leicht zu erkennen: Cloud-Provider wie AWS, Google Cloud und Hetzner veröffentlichen ihre IP-Blöcke in öffentlichen Datenbanken. Anti-Bot-Dienste wie Cloudflare, PerimeterX und Akamai blockieren Datacenter-IPs oft bereits auf Netzwerkebene, bevor überhaupt ein HTTP-Statuscode zurückkommt. Residential Proxys verwenden IPs, die echten ISPs zugewiesen sind — sie erscheinen als normale Haushaltsverbindungen und haben eine deutlich höhere Success-Rate bei harten Zielen.\u003C\u002Fp>\n\u003Cp>Typische Erfolgsraten bei stark geschützten Seiten liegen bei Datacenter-Proxys unter 10%, während Residential Proxys 80–95% erreichen, abhängig von Rotationsstrategie und Request-Kadenz. ProxyHat bietet Residential Proxys mit Geo-Targeting auf Länder- und Stadtebene über Username-Flags:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>user-country-DE:pass\u003C\u002Fcode> — beliebige deutsche IP\u003C\u002Fli>\n\u003Cli>\u003Ccode>user-country-DE-region-state_of_berlin-city-berlin:pass\u003C\u002Fcode> — IP aus Berlin\u003C\u002Fli>\n\u003Cli>\u003Ccode>user-sid-abc123:pass\u003C\u002Fcode> — Sticky Session, gleiche IP für die Lebensdauer der Session\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Kombinieren Sie Geo-Targeting und Sessions: \u003Ccode>user-country-DE-region-state_of_berlin-city-berlin-sid-abc123:pass\u003C\u002Fcode> hält eine Berliner IP für alle Requests derselben Session stabil. Das ist wichtig für Login-Flows oder mehrstufige Formulare.\u003C\u002Fp>\n\n\u003Ch3>SOCKS5 als Alternative\u003C\u002Fh3>\n\u003Cp>Für Ziele, die HTTP-Proxy-Header inspizieren oder SOCKS5 bevorzugen, nutzt ProxyHat Port \u003Ccode>1080\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>proxies := []*url.URL{\n    mustParse(&quot;socks5:\u002F\u002Fuser-sid-s1:pass@gate.proxyhat.com:1080&quot;),\n    mustParse(&quot;socks5:\u002F\u002Fuser-sid-s2:pass@gate.proxyhat.com:1080&quot;),\n    mustParse(&quot;socks5:\u002F\u002Fuser-sid-s3:pass@gate.proxyhat.com:1080&quot;),\n}\nrp, _ := proxy.RoundRobinProxySwitcher(proxies...)\nc.SetProxyFunc(rp)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Beachten Sie, dass SOCKS5 einen leicht höheren Overhead hat als HTTP-CONNECT — typischerweise 10–30&nbsp;ms zusätzliche Latenz pro Request. Messen Sie beide Varianten gegen Ihr Ziel.\u003C\u002Fp>\n\n\u003Ch2>Produktionsmuster: Retries, Delay, TLS und verteiltes Scraping\u003C\u002Fh2>\n\u003Cp>Ein produktiver Scraper muss mit transienten Fehlern umgehen, Rate-Limits respektieren und über mehrere Instanzen skalieren. Hier sind die wichtigsten Muster.\u003C\u002Fp>\n\n\u003Ch3>Retries mit c.Clone()\u003C\u002Fh3>\n\u003Cp>Collys \u003Ccode>OnError\u003C\u002Fcode>-Callback ist der richtige Ort für Retry-Logik. Verwenden Sie \u003Ccode>c.Clone()\u003C\u002Fcode>, um einen unabhängigen Sub-Collector zu erzeugen, der denselben Proxy und dieselben Callbacks erbt, aber eigene Zähler führt:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>c.OnError(func(r *colly.Response, err error) {\n    if r.StatusCode == 429 || r.StatusCode == 503 {\n        retry := r.Request.Ctx.GetInt(&quot;retry&quot;)\n        if retry &lt; 3 {\n            r.Request.Ctx.Put(&quot;retry&quot;, retry+1)\n            time.Sleep(time.Duration(retry+1) * 2 * time.Second)\n            r.Request.Retry()\n        }\n    }\n})\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Die exponentielle Backoff-Strategie (2s, 4s, 6s) verhindert, dass Sie bei einem temporären Block noch aggressiver werden und die IP dauerhaft sperren.\u003C\u002Fp>\n\n\u003Ch3>Limit-Regeln: Parallelism und RandomDelay\u003C\u002Fh3>\n\u003Cp>Collys \u003Ccode>Limit()\u003C\u002Fcode> akzeptiert mehrere Regeln pro Domain. Kombinieren Sie \u003Ccode>Parallelism\u003C\u002Fcode> mit \u003Ccode>RandomDelay\u003C\u002Fcode>, um natürliches Verkehrsverhalten zu simulieren:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>c.Limit(&amp;colly.LimitRule{\n    DomainGlob:  &quot;*.example.com&quot;,\n    Parallelism: 10,\n    Delay:       1 * time.Second,\n    RandomDelay: 500 * time.Millisecond,\n})\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Mit \u003Ccode>RandomDelay\u003C\u002Fcode> wird jeder Request zusätzlich um 0–500&nbsp;ms zufällig verzögert. Für harte Ziele sollten Sie nicht mehr als 5–10 gleichzeitige Requests pro Domain senden.\u003C\u002Fp>\n\n\u003Ch3>Custom Transport: TLS-Fingerprint und Timeouts\u003C\u002Fh3>\n\u003Cp>Colly erlaubt den Zugriff auf den zugrundeliegenden \u003Ccode>http.Transport\u003C\u002Fcode> über \u003Ccode>c.WithTransport(t)\u003C\u002Fcode>. Das ist nützlich für Custom-TLS-Konfiguration und aggressive Timeouts:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>c.WithTransport(&amp;http.Transport{\n    TLSClientConfig: &amp;tls.Config{\n        InsecureSkipVerify: false,\n        MinVersion:         tls.VersionTLS12,\n    },\n    DialContext: (&amp;net.Dialer{\n        Timeout:   10 * time.Second,\n        KeepAlive: 30 * time.Second,\n    }).DialContext,\n    MaxIdleConns:        100,\n    IdleConnTimeout:     90 * time.Second,\n    TLSHandshakeTimeout: 10 * time.Second,\n})\n\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Ch3>Verteiltes Scraping mit Redis-Storage\u003C\u002Fh3>\n\u003Cp>Für Multi-Instance-Setups nutzt Colly Storage-Backends. Der Redis-Storage teilt besuchte URLs und Cookies über mehrere Prozesse hinweg — ideal für Container-Fleets:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>import &quot;github.com\u002Fgocolly\u002Fredisstorage&quot;\n\nstorage := &amp;redisstorage.Storage{\n    Address:  &quot;redis:6379&quot;,\n    Password: &quot;&quot;,\n    DB:       0,\n    Prefix:   &quot;scraper&quot;,\n}\nc.SetStorage(storage)\ndefer storage.Client.Close()\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Mit Redis als Storage können Sie 5–20 Colly-Instanzen parallel betreiben, ohne URLs doppelt zu besuchen. Die visited-URL-Set wird atomar über \u003Ccode>SETNX\u003C\u002Fcode> verwaltet.\u003C\u002Fp>\n\n\u003Ch2>Vergleich: Proxy-Typen für Colly\u003C\u002Fh2>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Eigenschaft\u003C\u002Fth>\n\u003Cth>Datacenter\u003C\u002Fth>\n\u003Cth>Residential\u003C\u002Fth>\n\u003Cth>Mobile\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Success-Rate bei harten Zielen\u003C\u002Ftd>\n\u003Ctd>10–30%\u003C\u002Ftd>\n\u003Ctd>80–95%\u003C\u002Ftd>\n\u003Ctd>90–99%\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Latenz\u003C\u002Ftd>\n\u003Ctd>50–200&nbsp;ms\u003C\u002Ftd>\n\u003Ctd>200–800&nbsp;ms\u003C\u002Ftd>\n\u003Ctd>500–2000&nbsp;ms\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Preis (pro GB)\u003C\u002Ftd>\n\u003Ctd>~$0,50–1\u003C\u002Ftd>\n\u003Ctd>~$3–8\u003C\u002Ftd>\n\u003Ctd>~$15–30\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Erkennungsrisiko\u003C\u002Ftd>\n\u003Ctd>Hoch\u003C\u002Ftd>\n\u003Ctd>Niedrig\u003C\u002Ftd>\n\u003Ctd>Sehr niedrig\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Einsatz in Colly\u003C\u002Ftd>\n\u003Ctd>Einfache Ziele, Tests\u003C\u002Ftd>\n\u003Ctd>Produktion, SERP-Scraping\u003C\u002Ftd>\n\u003Ctd>Mobile-App-APIs, hartnäckige Blocks\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\n\u003Ch2>Wann Colly NICHT die richtige Wahl ist\u003C\u002Fh2>\n\u003Cp>Colly ist ein HTTP-Client-Scraper — er führt kein JavaScript aus. Wenn Ihr Ziel eine Single-Page-Application (React, Vue, Angular) ist, die Inhalte erst clientseitig rendert, sehen Sie nur eine leere HTML-Hülle. In diesem Fall benötigen Sie einen Headless-Browser wie \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fchromedp\u002Fchromedp\" rel=\"noopener noreferrer\">chromedp\u003C\u002Fa> oder Playwright für Go. Kombinieren Sie dann den Browser mit ProxyHat über Chrome's \u003Ccode>--proxy-server\u003C\u002Fcode>-Flag:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>chromedp.Run(ctx,\n    chromedp.Navigate(&quot;about:blank&quot;),\n    \u002F\u002F Proxy wird beim Browser-Kontext gesetzt\n)\n\u002F\u002F --proxy-server=http:\u002F\u002Fuser-country-DE:pass@gate.proxyhat.com:8080\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Für reine HTML-Seiten, APIs und JSON-Endpoints ist Colly jedoch die schnellere und ressourceneffizientere Wahl — ein Colly-Prozess verbraucht typischerweise unter 50&nbsp;MB RAM und kann 500–1000 Requests pro Sekunde verarbeiten.\u003C\u002Fp>\n\n\u003Ch2>ProxyHat-spezifisches Setup\u003C\u002Fh2>\n\u003Cp>ProxyHat-Residential-Proxys sind über einen einzigen Gateway-Endpunkt erreichbar. Alle Konfiguration — Geo-Targeting, Sessions, Rotation — erfolgt über den Benutzernamen. Hier die wichtigsten Formate:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>HTTP (Standard): \u003Ccode>http:\u002F\u002FUSERNAME:PASSWORD@gate.proxyhat.com:8080\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>SOCKS5: \u003Ccode>socks5:\u002F\u002FUSERNAME:PASSWORD@gate.proxyhat.com:1080\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Geo-Targeting: \u003Ccode>user-country-DE-region-state_of_berlin-city-berlin:pass@gate.proxyhat.com:8080\u003C\u002Fcode>\u003C\u002Fli>\n\u003Cli>Sticky Session: \u003Ccode>user-sid-abc123:pass@gate.proxyhat.com:8080\u003C\u002Fcode>\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Weitere Details finden Sie in der \u003Ca href=\"https:\u002F\u002Fdocs.proxyhat.com\u002F\" rel=\"noopener noreferrer\">ProxyHat-Dokumentation\u003C\u002Fa>. Aktuelle Preise und verfügbare Standorte finden Sie auf der \u003Ca href=\"\u002Fde\u002Fpricing\">ProxyHat-Preisseite\u003C\u002Fa> und der \u003Ca href=\"\u002Fde\u002Flocations\">Locations-Seite\u003C\u002Fa>.\u003C\u002Fp>\n\n\u003Ch3>Praktische Use Cases\u003C\u002Fh3>\n\u003Cp>Rotierende Proxys in Colly eignen sich besonders für:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fde\u002Fuse-cases\u002Fserp-tracking\">SERP-Tracking\u003C\u002Fa> — Google-Ergebnisse über mehrere Länder hinweg erfassen, ohne CAPTCHAs auszulösen.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fde\u002Fuse-cases\u002Fweb-scraping\">Web-Scraping\u003C\u002Fa> im großen Maßstab — E-Commerce-Preisüberwachung über Tausende Produktseiten.\u003C\u002Fli>\n\u003Cli>Social-Media-Recherche — öffentliche Posts und Metadaten sammeln, ohne Account-Sperren zu riskieren.\u003C\u002Fli>\n\u003Cli>KI-Trainingsdaten-Sammlung — große Korpora aus öffentlichen Quellen aggregieren.\u003C\u002Fli>\n\u003C\u002Ful>\n\n\u003Ch2>Key Takeaways\u003C\u002Fh2>\n\u003Cblockquote>\n\u003Cul>\n\u003Cli>SetProxyFunc ist der idiomatische Weg — nutzen Sie \u003Ccode>proxy.RoundRobinProxySwitcher\u003C\u002Fcode> für einfache Rotation oder eine eigene \u003Ccode>func(*http.Request) (*url.URL, error)\u003C\u002Fcode> für Geo-Targeting pro Request.\u003C\u002Fli>\n\u003Cli>Residential Proxys sind Pflicht für harte Ziele — Datacenter-IPs werden von Cloudflare &amp; Co. oft direkt blockiert. ProxyHat-Residential-IPs erreichen 80–95% Success-Rate.\u003C\u002Fli>\n\u003Cli>Geo-Targeting über Username-Flags — \u003Ccode>-country-DE-region-state_of_berlin-city-berlin\u003C\u002Fcode> und \u003Ccode>-sid-abc123\u003C\u002Fcode> in der Username-Zeile steuern Standort und Sticky-Sessions.\u003C\u002Fli>\n\u003Cli>Limit-Regeln setzen — \u003Ccode>Parallelism\u003C\u002Fcode> auf 5–20, \u003Ccode>RandomDelay\u003C\u002Fcode> 200–500&nbsp;ms, um natürliches Verhalten zu simulieren.\u003C\u002Fli>\n\u003Cli>Redis-Storage für verteiltes Scraping — mehrere Colly-Instanzen teilen sich besuchte URLs über Redis, doppelte Requests werden vermieden.\u003C\u002Fli>\n\u003Cli>Colly ist kein Browser — für JS-Heavy-SPAs nutzen Sie chromedp oder Playwright mit ProxyHat als \u003Ccode>--proxy-server\u003C\u002Fcode>.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fblockquote>","Rotierende Proxys in Colly: Go-Proxy-Rotation Guide | ProxyHat","Rotierende Proxys in Colly mit ProxyHat: RoundRobinProxySwitcher, SetProxyFunc, Residential IPs, Geo-Targeting und Produktionsmuster für Go-Scraper.","\u002Fde\u002Fblog\u002Frotierende-proxies-in-colly",null,"Rotierende Proxys in Colly | ProxyHat","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Frotierende-proxies-in-colly-og.webp",[18,21,24],{"question":19,"answer":20},"Warum sind rotierende Proxys in Colly wichtig?","Ohne Rotation senden Sie alle Requests von einer IP und erreichen schnell Ratenlimits oder werden geblockt. Mit rotierenden Residential-Proxys verteilen Sie die Last auf hunderte IPs, was die Success-Rate bei geschützten Zielen von unter 30% auf über 80% erhöht. Das ist besonders wichtig für SERP-Scraping und Preisüberwachung.",{"question":22,"answer":23},"Wie vermeide ich Blocks bei der Implementierung rotierender Proxys in Colly?","Nutzen Sie Residential Proxys mit Geo-Targeting, setzen Sie Limit()-Regeln mit Parallelism von 5–20 und RandomDelay von 200–500 ms. Implementieren Sie Retry-Logik mit exponentiellem Backoff in OnError. Rotieren Sie Session-IDs pro Request, um IP-Wiederholungen zu vermeiden, und respektieren Sie robots.txt und die Rate-Limits der Zielseite.",{"question":25,"answer":26},"Kann ich SOCKS5-Proxys in Colly verwenden?","Ja, Colly unterstützt SOCKS5-Proxys über das socks5:\u002F\u002F-URL-Schema. Bei ProxyHat verwenden Sie Port 1080 statt 8080: socks5:\u002F\u002Fuser-sid-abc123:pass@gate.proxyhat.com:1080. Beachten Sie, dass SOCKS5 typischerweise 10–30 ms zusätzliche Latenz pro Request verursacht.",false,"2026-08-04T10:05:34+00:00","2026-10-03T23:53:00+00:00","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Frotierende-proxies-in-colly-master.webp","Rotating Proxies in Colly: A Framework-Idiomatic Guide for Go Developers","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Frotierende-proxies-in-colly-card.webp",12,{"name":35,"slug":36,"bio":37,"avatar_url":14,"website_url":14,"social_links":14},"ProxyHat Team","proxyhat-team","The ProxyHat editorial team covers proxies, web scraping, and data extraction.",[39],{"id":40,"slug":41,"name":42,"description":14,"meta_title":43,"meta_description":44,"parent_id":14},4,"entwickler-anleitungen","Entwickler-Anleitungen","Entwickler-Anleitungen | ProxyHat Blog","Code-Tutorials und SDK-Anleitungen zur Proxy-Integration in Ihre Anwendungen.",[],{"es":47,"ru":48,"ja":49,"pt":50,"pl":51,"ko":52,"tr":53,"zh":54,"it":55,"de":13,"en":56,"fr":57,"x-default":56},"\u002Fes\u002Fblog\u002Frotacion-proxies-colly-golang-1","\u002Fru\u002Fblog\u002Frotaciya-proksi-v-colly-1","\u002Fja\u002Fblog\u002Fcolly-purokushi-roteshon-gaido","\u002Fpt\u002Fblog\u002Fproxies-rotativos-em-colly","\u002Fpl\u002Fblog\u002Frotacja-proxy-w-colly-1","\u002Fko\u002Fblog\u002Fcolly-rotating-proxy-guide","\u002Ftr\u002Fblog\u002Fcolly-doner-proxy-rehberi","\u002Fcn\u002Fblog\u002Fcolly-lunhuan-daili-shixian-zhinan","\u002Fit\u002Fblog\u002Fproxy-rotanti-in-colly-guida","\u002Fblog\u002Frotating-proxies-in-colly-golang","\u002Ffr\u002Fblog\u002Frotation-proxies-colly-golang-1",{"es":47,"ru":48,"ja":49,"pt":50,"pl":51,"ko":52,"tr":53,"zh":54,"it":55,"de":13,"en":56,"fr":57},71,[61,95,122,138],{"id":62,"slug":63,"title":64,"excerpt":65,"featured_image_url":66,"featured_image_alt":67,"card_image_url":68,"og_image_url":69,"published_at":70,"updated_at":71,"content_updated_at":72,"reading_time_minutes":73,"is_featured":27,"indexable":4,"views":74,"author":75,"categories":76,"tags":78},210,"proxy-einrichtung-fuer-ki-agenten","Proxy für KI-Agenten einrichten: browser-use, Crawl4AI und MCP","Agenten auf Cloud-VMs treten mit Datacenter-IPs ins Netz. Hier finden Sie aktuelle, funktionierende Proxy-Konfigurationen für browser-use, Crawl4AI und einen MCP-Server, eine Entscheidungstabelle für Sticky vs. Rotation und die Kostenfallen, die Sie vermeiden sollten.","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fproxy-einrichtung-fuer-ki-agenten-master.webp","Proxy Setup for AI Agents: browser-use, Crawl4AI and an MCP Server","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fproxy-einrichtung-fuer-ki-agenten-card.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fproxy-einrichtung-fuer-ki-agenten-og.webp","2026-10-24T09:00:00+00:00","2026-10-24T09:00:20+00:00","2026-10-03T09:41:41+00:00",14,15,{"name":35,"slug":36,"bio":37,"avatar_url":14,"website_url":14,"social_links":14},[77],{"id":40,"slug":41,"name":42,"description":14,"meta_title":43,"meta_description":44,"parent_id":14},[79,83,87,91],{"id":80,"slug":81,"name":82},1,"web-scraping","Web Scraping",{"id":84,"slug":85,"name":86},2,"residential-proxies","Residential Proxies",{"id":88,"slug":89,"name":90},9,"python","Python",{"id":92,"slug":93,"name":94},22,"playwright","Playwright",{"id":96,"slug":97,"title":98,"excerpt":99,"featured_image_url":100,"featured_image_alt":101,"card_image_url":102,"og_image_url":103,"published_at":104,"updated_at":105,"content_updated_at":72,"reading_time_minutes":73,"is_featured":27,"indexable":4,"views":106,"author":107,"categories":108,"tags":110},206,"camoufox-residential-proxies-python-anleitung","Camoufox mit Residential Proxies: Python-Anleitung mit Code","So betreiben Sie Camoufox, den in C++ gepatchten Firefox, hinter Residential Proxies: aktuelle Python-API, warum geoip eine Sticky Session braucht, eine Checkliste zur Fingerprint-Kohärenz und wann Patchright oder nodriver besser passt.","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fcamoufox-residential-proxies-python-anleitung-master.webp","Camoufox with Residential Proxies: A Code-First Python Guide","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fcamoufox-residential-proxies-python-anleitung-card.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fcamoufox-residential-proxies-python-anleitung-og.webp","2026-10-13T09:00:00+00:00","2026-10-13T09:00:22+00:00",31,{"name":35,"slug":36,"bio":37,"avatar_url":14,"website_url":14,"social_links":14},[109],{"id":40,"slug":41,"name":42,"description":14,"meta_title":43,"meta_description":44,"parent_id":14},[111,112,113,117,118],{"id":80,"slug":81,"name":82},{"id":84,"slug":85,"name":86},{"id":114,"slug":115,"name":116},6,"anti-erkennung","Anti-Erkennung",{"id":88,"slug":89,"name":90},{"id":119,"slug":120,"name":121},21,"headless-browser","Headless Browser",{"id":123,"slug":124,"title":125,"excerpt":126,"featured_image_url":127,"featured_image_alt":128,"card_image_url":129,"og_image_url":130,"published_at":131,"updated_at":131,"content_updated_at":132,"reading_time_minutes":33,"is_featured":27,"indexable":27,"views":133,"author":134,"categories":135,"tags":137},176,"got-scraping-nodejs-proxy-guide","got-scraping in Node.js: Residential Proxies & Header Generator Praxisleitfaden","Ein entwicklerorientierter Leitfaden zu got-scraping in Node.js mit Residential Proxies: Header-Generierung, Proxy-Rotation, Retry-Hooks und Produktionsmuster für skalierendes Scraping.","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fgot-scraping-nodejs-proxy-guide-master.webp","got-scraping in Node.js: A Developer's Guide with Residential Proxies","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fgot-scraping-nodejs-proxy-guide-card.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fgot-scraping-nodejs-proxy-guide-og.webp","2026-08-04T16:05:06+00:00","2026-10-03T08:29:58+00:00",121,{"name":35,"slug":36,"bio":37,"avatar_url":14,"website_url":14,"social_links":14},[136],{"id":40,"slug":41,"name":42,"description":14,"meta_title":43,"meta_description":44,"parent_id":14},[],{"id":139,"slug":140,"title":141,"excerpt":142,"featured_image_url":143,"featured_image_alt":144,"card_image_url":145,"og_image_url":146,"published_at":147,"updated_at":147,"content_updated_at":148,"reading_time_minutes":33,"is_featured":27,"indexable":4,"views":149,"author":150,"categories":151,"tags":153},195,"bybit-v5-market-api-mit-rotating-proxies-scrapen","Krypto-Marktdaten über einheitliche Börsen-APIs mit rotierenden Proxies abrufen: Entwickler-Leitfaden (Beispiel Bybit V5)","Praktischer Entwickler-Leitfaden für das Scrapen der Bybit V5 Market API mit rotierenden Proxies – inklusive Code-Beispielen für Node.js und Python, Rate-Limit-Strategien und ProxyHat-Setup.","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fbybit-v5-market-api-mit-rotating-proxies-scrapen-master.webp","How to Scrape the Bybit V5 Market API with Rotating Proxies","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fbybit-v5-market-api-mit-rotating-proxies-scrapen-card.webp","https:\u002F\u002Fstatic.proxyhat.com\u002Fstorage\u002Fblog-covers\u002Fde\u002Fbybit-v5-market-api-mit-rotating-proxies-scrapen-og.webp","2026-08-03T16:09:16+00:00","2026-10-04T01:29:51+00:00",87,{"name":35,"slug":36,"bio":37,"avatar_url":14,"website_url":14,"social_links":14},[152],{"id":40,"slug":41,"name":42,"description":14,"meta_title":43,"meta_description":44,"parent_id":14},[],[]]