← Back to Blog

Bypassing Turnstile and hCaptcha Methods Using Proxies

We analyze the mechanisms of Turnstile and hCaptcha, examine fingerprinting methods, and share proven bypass techniques using proxies with code examples.

πŸ“…December 19, 2025

Bypassing Turnstile and hCaptcha: Protection Technologies and Solutions

Cloudflare Turnstile and hCaptcha have become the standard for protecting web services from bots, replacing traditional reCAPTCHA. These systems analyze dozens of browser and network environment parameters, making the use of proxies a serious challenge for automation. In this article, we will explore how these technologies work at a technical level and which bypass methods are truly effective when working through proxies.

How Cloudflare Turnstile Works

Cloudflare Turnstile is a next-generation protection system that is marketed as an "invisible alternative to CAPTCHA." Unlike classic reCAPTCHA, Turnstile does not require users to select traffic lights or crosswalks. Instead, the system analyzes behavioral and technical characteristics of the browser in the background.

Technically, Turnstile operates in three stages. The first is the loading of a JavaScript widget, which is embedded on the page via an iframe. The second is telemetry collection: the system gathers data about the browser, including WebGL fingerprint, Canvas fingerprint, font list, screen resolution, time zone, system language, and many other parameters. The third stage is validation on Cloudflare's servers, where the collected data is matched against known patterns of bots and proxies.

A key feature of Turnstile is the use of a reputation system for IP addresses. Cloudflare has a vast database collected from millions of websites using their CDN and DDoS protection. If an IP address is detected in suspicious activity, the likelihood of passing Turnstile decreases sharply. This creates the first problem for proxy users β€” even clean residential IPs can have low reputation due to previous owners.

Important: Turnstile has three operating modes β€” managed (automatic), non-interactive (no interaction), and invisible (completely hidden). The mode determines the strictness of the verification and affects the bypass methods.

hCaptcha Technology and Detection Methods

hCaptcha emerged as a competitor to Google reCAPTCHA with a focus on privacy and monetization through machine learning. The system offers website owners the opportunity to pay for using user data to train AI models. From a technical standpoint, hCaptcha is more aggressive in detecting automation than Turnstile.

The core mechanism of hCaptcha involves several layers of protection. The first layer is the analysis of network parameters: the system checks the TTL of packets, network latency, consistency of the IP address geolocation, and the declared time zone of the browser. The second layer involves JavaScript calls: hCaptcha checks for the presence and proper functioning of Web APIs, including WebRTC, Battery API, and Sensor API. The third layer is behavioral analysis of mouse movements, scrolling speed, and click patterns.

A distinctive feature of hCaptcha is the use of challenge-based checks. If the system suspects a bot, it presents visual tasks: selecting images with specific objects, solving puzzles, recognizing text in distorted images. The difficulty of the tasks dynamically increases with each failed attempt. For proxy users, this means that even with the correct fingerprint, they can face an endless chain of captchas.

Parameter Turnstile hCaptcha
Invisible Mode Yes, by default Optional
IP Reputation Critical Important
Fingerprinting Moderate Aggressive
Behavioral Analysis Basic Advanced
Captcha Frequency Low Medium-High

Browser Fingerprinting and Proxies

Browser fingerprinting is a technique for identifying users based on a unique set of browser and device characteristics. Even if you use a proxy to change your IP address, the fingerprint remains unchanged and can reveal the use of automation. Modern protection systems collect from 50 to 200+ parameters to create a fingerprint.

The main components of a fingerprint include: Canvas fingerprint (unique rendering of graphics depending on GPU and drivers), WebGL fingerprint (graphics accelerator parameters), Audio Context fingerprint (audio processing features), list of installed fonts, screen parameters (resolution, color depth, pixel ratio), User-Agent and browser headers, language settings, time zone, presence of plugins and extensions.

The problem for proxy users lies in discrepancies. For example, if your IP address shows a location in Germany, but the browser's time zone is set to Moscow β€” this is a red flag. If a WebRTC leak reveals your real IP address, which differs from the proxy β€” the system will instantly identify the substitution. If the User-Agent claims Windows, but the Canvas fingerprint corresponds to Linux β€” detection is guaranteed.

// Example of collecting a basic fingerprint
const fingerprint = {
  canvas: getCanvasFingerprint(),
  webgl: getWebGLFingerprint(),
  fonts: getFonts(),
  screen: {
    width: screen.width,
    height: screen.height,
    colorDepth: screen.colorDepth,
    pixelRatio: window.devicePixelRatio
  },
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
  language: navigator.language,
  platform: navigator.platform,
  hardwareConcurrency: navigator.hardwareConcurrency,
  deviceMemory: navigator.deviceMemory,
  webrtc: await getWebRTCIPs()
};

function getCanvasFingerprint() {
  const canvas = document.createElement('canvas');
  const ctx = canvas.getContext('2d');
  ctx.textBaseline = 'top';
  ctx.font = '14px Arial';
  ctx.fillText('Browser fingerprint', 2, 2);
  return canvas.toDataURL();
}

Proxy Server Detection Methods

Protection systems use many techniques to detect proxies. The first method is checking against databases of known proxies and VPNs. Services like IPHub, IP2Proxy, and MaxMind GeoIP2 contain millions of IP addresses classified as proxies, VPNs, or hosting providers. Cloudflare and hCaptcha are integrated with such databases and automatically increase the level of verification for suspicious IPs.

The second method is analyzing ASN (Autonomous System Number). Data center proxies typically belong to hosting providers (AWS, DigitalOcean, OVH), which can be easily identified by ASN. Residential proxies use ASN of regular Internet Service Providers (Comcast, Verizon, Deutsche Telekom), making them less suspicious. However, even residential networks can be partially compromised if the provider is known for selling proxies.

The third method is behavioral analysis at the network level. Systems track anomalies: unusually low or high TTL of packets, atypical latencies, use of non-standard ports, discrepancies in geolocation and routing path. For example, if an IP address is geolocated in the USA, but traceroute shows a route through European servers β€” this is a sign of a proxy.

Common Mistake: Using a single IP address for multiple sessions with different fingerprints. Systems track such patterns and ban the IP entirely, even if it is a quality residential proxy.

Residential Proxies as a Basic Solution

Residential proxies are the foundation for bypassing Turnstile and hCaptcha. Unlike data center proxies, residential proxies use IP addresses from real devices: home routers, mobile phones, IoT devices. This makes them virtually indistinguishable from regular users in terms of network infrastructure.

Key advantages of residential proxies for bypassing captchas include: belonging to ISPs (Internet Service Providers) rather than hosting providers; clean IP address reputation in most cases; correct geolocation and routing; low likelihood of being blacklisted. However, not all residential proxies are equally effective. Several factors are critically important.

The first factor is IP address rotation. Static residential proxies (sticky sessions) allow the use of one IP for several minutes to several hours. This is optimal for scenarios requiring session maintenance: authorization, form filling, multi-step operations. Rotating proxies change IPs for each request or on a timer, which is useful for scraping but can cause captcha issues due to frequent context changes.

The second factor is geographical distribution. To bypass captchas, it is important that the geolocation of the IP matches the targeting of the website and the browser settings. If you are working with a German site, use German residential proxies and set the corresponding time zone (Europe/Berlin), language (de-DE), and locale in the browser.

The third factor is the quality of the proxy provider. Cheap residential proxies are often gathered through dubious methods (free VPN applications, infected devices), leading to a low reputation of the IP pool. Professional providers work with legitimate SDK partnerships and carefully monitor network quality. Check the success rate of the provider on target sites before scaling.

Automation Tools: Selenium, Puppeteer, Playwright

The choice of automation tool critically affects the ability to bypass captchas. Selenium, Puppeteer, and Playwright are the three main solutions, each with its own detection characteristics. Protection systems can identify the use of these tools through dozens of signs.

Selenium is the oldest and most easily detectable tool. A browser controlled by Selenium has clear markers: the variable window.navigator.webdriver is set to true, some properties of the navigator object are missing, and the specific window sizes typical for automation are present. Even with proxies, Selenium often fails Turnstile and hCaptcha checks without additional obfuscation.

Puppeteer and Playwright are more modern tools based on the Chrome DevTools Protocol. They are also detectable but have fewer obvious signs. The main detection methods include checking chrome.runtime, analyzing the permissions API, detecting headless mode through the absence of plugins and specific viewport sizes, and checking for the presence of DevTools through timing attacks.

// Basic Puppeteer setup with proxy and anti-detection
const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');

puppeteer.use(StealthPlugin());

const browser = await puppeteer.launch({
  headless: false, // headless: true is easily detectable
  args: [
    '--proxy-server=http://your-proxy:port',
    '--disable-blink-features=AutomationControlled',
    '--disable-dev-shm-usage',
    '--no-sandbox',
    '--disable-setuid-sandbox',
    '--disable-web-security',
    '--disable-features=IsolateOrigins,site-per-process',
    `--window-size=1920,1080`,
    '--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
  ]
});

const page = await browser.newPage();

// Proxy authentication
await page.authenticate({
  username: 'proxy_user',
  password: 'proxy_pass'
});

// Overriding the webdriver property
await page.evaluateOnNewDocument(() => {
  Object.defineProperty(navigator, 'webdriver', {
    get: () => false
  });
  
  // Emulating plugins for headless
  Object.defineProperty(navigator, 'plugins', {
    get: () => [1, 2, 3, 4, 5]
  });
});

For serious captcha bypassing, it is recommended to use specialized anti-detection browsers: Multilogin, GoLogin, AdsPower, Dolphin Anty. These solutions create isolated browser profiles with unique fingerprints, manage cookies and session storage, automatically synchronize the time zone with the proxy's geolocation, and emulate realistic Canvas and WebGL fingerprints.

Captcha Solving Services: Integration and Effectiveness

When technical methods are insufficient, captcha solving services come to the rescue. They are divided into two types: human (crowdsourcing) and automated (machine learning). The effectiveness for Turnstile and hCaptcha varies.

Human services (2Captcha, AntiCaptcha, CapSolver, CapMonster Cloud) operate on the principle of distributed labor: your captcha is sent to a real person who solves it manually. Advantages include a high success rate (95-99% for hCaptcha, 85-95% for Turnstile), support for complex visual tasks, and relative stability. Disadvantages include a solving speed of 10-60 seconds, a cost of $1-3 per 1000 captchas, and dependence on operator availability.

Automated services use AI models for recognition. They are faster (1-5 seconds) and cheaper, but have a lower success rate for modern captchas β€” usually 60-80% for hCaptcha and 50-70% for Turnstile. They are effective for simple challenge-based tasks but often fail on invisible checks.

// Integration of 2Captcha for solving hCaptcha
const axios = require('axios');

async function solveHCaptcha(sitekey, pageUrl, proxyConfig) {
  const API_KEY = 'your_2captcha_api_key';
  
  // Sending the task
  const createTask = await axios.post('https://2captcha.com/in.php', null, {
    params: {
      key: API_KEY,
      method: 'hcaptcha',
      sitekey: sitekey,
      pageurl: pageUrl,
      proxy: `${proxyConfig.type}:${proxyConfig.host}:${proxyConfig.port}:${proxyConfig.user}:${proxyConfig.pass}`,
      json: 1
    }
  });
  
  const taskId = createTask.data.request;
  
  // Waiting for the solution
  let solution = null;
  for (let i = 0; i < 60; i++) {
    await new Promise(resolve => setTimeout(resolve, 3000));
    
    const result = await axios.get('https://2captcha.com/res.php', {
      params: {
        key: API_KEY,
        action: 'get',
        id: taskId,
        json: 1
      }
    });
    
    if (result.data.status === 1) {
      solution = result.data.request;
      break;
    }
  }
  
  return solution; // token to insert into the form
}

// Usage in Puppeteer
const captchaToken = await solveHCaptcha(
  'site-key-from-page',
  'https://example.com',
  { type: 'http', host: 'proxy.example.com', port: 8080, user: 'user', pass: 'pass' }
);

await page.evaluate((token) => {
  document.querySelector('[name="h-captcha-response"]').value = token;
  document.querySelector('[name="g-recaptcha-response"]').value = token;
}, captchaToken);

It is critically important to pass the correct proxy parameters to the captcha solving service. If the captcha is solved from one IP and then the token is used from another β€” validation will fail. Modern captchas tie the token to the IP address, User-Agent, and other session parameters.

Advanced Techniques: Device Emulation and TLS Fingerprinting

To bypass the most secure systems, advanced techniques are required that go beyond basic proxy and browser setup. Two key areas are mobile device emulation and TLS fingerprint management.

Mobile proxies combined with mobile browser emulation provide high effectiveness against captchas. Reasons include: mobile traffic has a higher trust score, mobile IP addresses (especially 4G/5G) are often dynamic and change naturally, mobile devices have a different set of fingerprint parameters, and many websites simplify checks for mobile users.

For proper emulation of a mobile device, it is necessary to: use a mobile User-Agent (exact match to the device model), set the correct viewport and devicePixelRatio, emulate touch events instead of mouse events, use mobile values for navigator.platform and navigator.maxTouchPoints, and configure WebGL and Canvas fingerprints for the specific device model.

// Emulating iPhone 13 Pro in Playwright
const { chromium, devices } = require('playwright');

const iPhone13Pro = devices['iPhone 13 Pro'];

const browser = await chromium.launch({
  proxy: {
    server: 'http://mobile-proxy:port',
    username: 'user',
    password: 'pass'
  }
});

const context = await browser.newContext({
  ...iPhone13Pro,
  locale: 'en-US',
  timezoneId: 'America/New_York',
  geolocation: { latitude: 40.7128, longitude: -74.0060 },
  permissions: ['geolocation']
});

const page = await context.newPage();

// Additional fingerprint setup
await page.addInitScript(() => {
  Object.defineProperty(navigator, 'hardwareConcurrency', {
    get: () => 6 // iPhone 13 Pro has 6 cores
  });
  
  Object.defineProperty(navigator, 'deviceMemory', {
    get: () => 6 // 6GB RAM
  });
});

TLS fingerprinting is a method of identifying the client based on the parameters of the TLS/SSL connection. Each browser and operating system has a unique combination of cipher suites, extensions, and elliptic curves that are transmitted when establishing an HTTPS connection. Protection systems analyze the TLS fingerprint and compare it with the declared User-Agent.

The problem with standard automation tools is that they use the TLS fingerprint of basic Chromium, which differs from full Chrome. This discrepancy is detectable. Solutions include using libraries like curl-impersonate or tls-client for Python, which emulate the TLS fingerprint of specific browsers; employing HTTP clients with TLS customization (e.g., cycletls for Node.js); and using full browsers instead of headless modes.

Combined Approach:

  • Residential or mobile proxies for clean IP
  • Anti-detection browser or properly configured Playwright for correct fingerprint
  • Synchronization of all parameters: IP geolocation = timezone = language = locale
  • Emulation of human behavior: delays, mouse movements, scrolling
  • Captcha solving service as a fallback for complex cases

Practical Code Examples

Let's consider a complete example of bypassing Turnstile using Playwright, residential proxies, and anti-detection techniques. This code demonstrates a comprehensive approach to solving the task.

const { chromium } = require('playwright-extra');
const stealth = require('puppeteer-extra-plugin-stealth')();

// Proxy configuration
const proxyConfig = {
  server: 'http://residential-proxy.proxycove.com:8080',
  username: 'your_username',
  password: 'your_password'
};

// Settings to simulate a real user from Germany
const userConfig = {
  viewport: { width: 1920, height: 1080 },
  userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
  locale: 'de-DE',
  timezoneId: 'Europe/Berlin',
  geolocation: { latitude: 52.5200, longitude: 13.4050 }, // Berlin
  permissions: ['geolocation']
};

async function bypassTurnstile(url) {
  const browser = await chromium.launch({
    headless: false, // important for complex captchas
    proxy: proxyConfig,
    args: [
      '--disable-blink-features=AutomationControlled',
      '--no-sandbox',
      '--disable-dev-shm-usage'
    ]
  });

  const context = await browser.newContext({
    ...userConfig,
    // Additional headers
    extraHTTPHeaders: {
      'Accept-Language': 'de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7',
      'Accept-Encoding': 'gzip, deflate, br',
      'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
      'DNT': '1',
      'Connection': 'keep-alive',
      'Upgrade-Insecure-Requests': '1'
    }
  });

  const page = await context.newPage();

  // Injecting anti-detection scripts
  await page.addInitScript(() => {
    // Hiding webdriver
    Object.defineProperty(navigator, 'webdriver', {
      get: () => undefined
    });

    // Emulating chrome runtime
    window.chrome = {
      runtime: {}
    };

    // Overriding permissions
    const originalQuery = window.navigator.permissions.query;
    window.navigator.permissions.query = (parameters) => (
      parameters.name === 'notifications' ?
        Promise.resolve({ state: Notification.permission }) :
        originalQuery(parameters)
    );

    // More realistic values for Windows
    Object.defineProperty(navigator, 'platform', {
      get: () => 'Win32'
    });

    Object.defineProperty(navigator, 'hardwareConcurrency', {
      get: () => 8
    });

    Object.defineProperty(navigator, 'deviceMemory', {
      get: () => 8
    });
  });

  // Emulating human behavior
  async function humanLikeDelay(min = 1000, max = 3000) {
    const delay = Math.random() * (max - min) + min;
    await page.waitForTimeout(delay);
  }

  async function humanLikeMouseMove() {
    const viewportSize = page.viewportSize();
    const x = Math.random() * viewportSize.width;
    const y = Math.random() * viewportSize.height;
    await page.mouse.move(x, y, { steps: 10 });
  }

  try {
    // Navigating to the page
    await page.goto(url, { waitUntil: 'networkidle' });
    
    await humanLikeDelay(2000, 4000);
    await humanLikeMouseMove();

    // Waiting for Turnstile to load
    await page.waitForSelector('iframe[src*="turnstile"]', { timeout: 10000 });
    
    console.log('Turnstile detected, waiting for automatic solution...');
    
    // Turnstile in managed mode is often solved automatically
    // Waiting for the token to appear
    await page.waitForFunction(() => {
      const response = document.querySelector('[name="cf-turnstile-response"]');
      return response && response.value.length > 0;
    }, { timeout: 30000 });

    console.log('Turnstile passed successfully!');
    
    // Further actions on the site
    await humanLikeDelay();
    
    // Example: filling out a form
    await page.fill('#email', 'user@example.com');
    await humanLikeDelay(500, 1500);
    
    await page.fill('#password', 'SecurePassword123');
    await humanLikeDelay(500, 1500);
    
    await humanLikeMouseMove();
    await page.click('button[type="submit"]');
    
    await page.waitForNavigation({ waitUntil: 'networkidle' });
    
    console.log('Authorization completed');

  } catch (error) {
    console.error('Error bypassing Turnstile:', error.message);
    
    // Screenshot for debugging
    await page.screenshot({ path: 'turnstile_error.png', fullPage: true });
    
  } finally {
    await browser.close();
  }
}

// Running
bypassTurnstile('https://example.com/login');

For hCaptcha with visual tasks, integration with a solving service will be required. Here’s an example using 2Captcha:

const axios = require('axios');

class HCaptchaSolver {
  constructor(apiKey) {
    this.apiKey = apiKey;
    this.baseUrl = 'https://2captcha.com';
  }

  async solve(sitekey, pageUrl, proxy = null) {
    // Creating a task
    const params = {
      key: this.apiKey,
      method: 'hcaptcha',
      sitekey: sitekey,
      pageurl: pageUrl,
      json: 1
    };

    if (proxy) {
      params.proxy = `${proxy.type}:${proxy.host}:${proxy.port}:${proxy.username}:${proxy.password}`;
      params.proxytype = proxy.type.toUpperCase();
    }

    const createResponse = await axios.post(`${this.baseUrl}/in.php`, null, { params });
    
    if (createResponse.data.status !== 1) {
      throw new Error(`Error creating task: ${createResponse.data.request}`);
    }

    const taskId = createResponse.data.request;
    console.log(`Task created: ${taskId}`);

    // Polling for the result
    for (let attempt = 0; attempt < 60; attempt++) {
      await new Promise(resolve => setTimeout(resolve, 5000));

      const resultResponse = await axios.get(`${this.baseUrl}/res.php`, {
        params: {
          key: this.apiKey,
          action: 'get',
          id: taskId,
          json: 1
        }
      });

      if (resultResponse.data.status === 1) {
        console.log('hCaptcha solved!');
        return resultResponse.data.request;
      }

      if (resultResponse.data.request !== 'CAPCHA_NOT_READY') {
        throw new Error(`Error solving: ${resultResponse.data.request}`);
      }

      console.log(`Attempt ${attempt + 1}/60: captcha still being solved...`);
    }

    throw new Error('Timeout: captcha not solved within 5 minutes');
  }
}

// Usage with Playwright
async function bypassHCaptcha(page, proxyConfig) {
  // Getting sitekey from the page
  const sitekey = await page.getAttribute('[data-sitekey]', 'data-sitekey');
  const pageUrl = page.url();

  const solver = new HCaptchaSolver('your_2captcha_api_key');
  
  const token = await solver.solve(sitekey, pageUrl, {
    type: 'http',
    host: 'residential-proxy.proxycove.com',
    port: 8080,
    username: 'your_username',
    password: 'your_password'
  });

  // Injecting the token into the page
  await page.evaluate((captchaToken) => {
    document.querySelector('[name="h-captcha-response"]').value = captchaToken;
    
    // For some sites, g-recaptcha-response is also required
    const gRecaptcha = document.querySelector('[name="g-recaptcha-response"]');
    if (gRecaptcha) {
      gRecaptcha.value = captchaToken;
    }
    
    // Triggering event for callback
    const event = new Event('change', { bubbles: true });
    document.querySelector('[name="h-captcha-response"]').dispatchEvent(event);
  }, token);

  console.log('hCaptcha token injected');
}

Conclusion

Bypassing Turnstile and hCaptcha via proxies is a complex task that requires an understanding of protection mechanisms and a smart combination of technologies. Key takeaways: use quality residential or mobile proxies instead of data center ones; synchronize all environment parameters (IP geolocation, timezone, language, locale); apply anti-detection techniques to hide automation; emulate realistic human behavior; use captcha solving services as an additional layer of protection.

The effectiveness of methods depends on the specific site and protection settings. It is recommended to start with a basic configuration and gradually complicate it while monitoring the success rate. Test on small volumes before scaling to avoid IP pool blocking. Regularly update fingerprint parameters and User-Agent to match current browser versions.

For professional work with captchas, consider using specialized automation platforms that combine proxies, anti-detection browsers, and solving services into a single ecosystem. This reduces integration complexity and increases result stability. Start with testing quality proxies on your target sites β€” this is the foundation for successfully bypassing modern protection systems.