{"slug": "launches-google-chrome-configured-with-us-country-overrides-to-enable-ai-feature", "title": "Launches Google Chrome configured with US country overrides to enable AI feature with automate OpenVPN  setup, connection to a US VPN Gate node with split-tunneling (route-nopull),     dynamically…", "summary": "A developer published a PowerShell script that automates access to Google's Gemini AI features on Windows by installing OpenVPN Connect V3, connecting to a US VPN Gate node with split-tunneling, and launching Chrome with US country overrides and Glic/Gemini flags. The script dynamically resolves Gemini-related domains, adds static OS routes through the VPN interface, and requires administrator privileges to run.", "body_md": "|  | <# | \n|  | .SYNOPSIS | \n|  | Launches Google Chrome configured with US country overrides to enable AI features, | \n|  | Automates OpenVPN Connect V3 setup, connects to a US VPN Gate node with split-tunneling (route-nopull), | \n|  | dynamically resolves target Gemini domains, adds static OS routes through the VPN interface, | \n|  | and launches Chrome with Glic/Gemini flags. | \n|  | #> | \n|  |  | \n|  | $ErrorActionPreference = \"Stop\" | \n|  |  | \n|  | # --- Domain Configuration --- | \n|  | $targetDomains = @( | \n|  | \"gemini.google.com\", | \n|  | \"generativelanguage.googleapis.com\", | \n|  | \"cloudaicompanion.googleapis.com\", | \n|  | \"alkalimodelfrontend-pa.googleapis.com\", | \n|  | \"clients4.google.com\" | \n|  | ) | \n|  |  | \n|  | # --- 1. Administrator Privilege Check --- | \n|  | Write-Host \"Verifying Administrator privileges...\" -ForegroundColor Cyan | \n|  | $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | \n|  | if (-not $isAdmin) { | \n|  | if ([string]::IsNullOrWhiteSpace($PSCommandPath)) { | \n|  | Write-Error \"Cannot auto-elevate in interactive mode. Please run this console as Administrator or save as a .ps1 file.\" | \n|  | exit 1 | \n|  | } | \n|  | Write-Warning \"Administrator privileges required. Relaunching with UAC...\" | \n|  | Start-Process powershell.exe -ArgumentList \"-NoExit -NoProfile -ExecutionPolicy Bypass -File `\"$PSCommandPath`\"\" -Verb RunAs | \n|  | exit | \n|  | } | \n|  |  | \n|  | # --- 2. Search and Install OpenVPN Connect V3 --- | \n|  | $openVpnPaths = @( | \n|  | \"$env:ProgramFiles\\OpenVPN Connect\\OpenVPNConnect.exe\", | \n|  | \"${env:ProgramFiles(x86)}\\OpenVPN Connect\\OpenVPNConnect.exe\" | \n|  | ) | \n|  | $openVpnExe = $openVpnPaths \\| Where-Object { -not [string]::IsNullOrWhiteSpace($_) -and (Test-Path $_) } \\| Select-Object -First 1 | \n|  |  | \n|  | if (-not $openVpnExe) { | \n|  | Write-Host \"OpenVPN Connect V3 not found. Installing the latest official version...\" -ForegroundColor Yellow | \n|  |  | \n|  | $openVpnUrl = \"https://openvpn.net/downloads/openvpn-connect-v3-windows.msi\" | \n|  | $installerPath = Join-Path $env:TEMP \"openvpn-connect-latest.msi\" | \n|  |  | \n|  | try { | \n|  | Write-Host \"Downloading OpenVPN Connect...\" -ForegroundColor Cyan | \n|  | Invoke-WebRequest -Uri $openVpnUrl -OutFile $installerPath -UseBasicParsing -ErrorAction Stop | \n|  | } catch { | \n|  | Write-Error \"Critical Error: Failed to download the OpenVPN Connect installer from official URL.\" | \n|  | exit 1 | \n|  | } | \n|  |  | \n|  | if (Test-Path $installerPath) { | \n|  | Write-Host \"Running silent installation for MSI package...\" -ForegroundColor Cyan | \n|  | Start-Process -FilePath \"msiexec.exe\" -ArgumentList \"/i `\"$installerPath`\" /qn /norestart\" -Wait -PassThru | \n|  | Remove-Item -Path $installerPath -Force -ErrorAction SilentlyContinue | \n|  | } | \n|  |  | \n|  | $openVpnExe = $openVpnPaths \\| Where-Object { -not [string]::IsNullOrWhiteSpace($_) -and (Test-Path $_) } \\| Select-Object -First 1 | \n|  | if (-not $openVpnExe) { | \n|  | Write-Error \"Critical Failure: OpenVPNConnect.exe not located post-installation.\" | \n|  | exit 1 | \n|  | } | \n|  | Write-Host \"OpenVPN Connect V3 installed successfully at: $openVpnExe\" -ForegroundColor Green | \n|  | } else { | \n|  | Write-Host \"OpenVPN Connect V3 is already installed: $openVpnExe\" -ForegroundColor Green | \n|  | } | \n|  |  | \n|  | # --- 3. Fetch US Nodes from VPN Gate API (Integrated OVfinder logic) --- | \n|  | $ovpnPath = Join-Path $env:TEMP \"vpngate_us.ovpn\" | \n|  | Write-Host \"Querying VPN Gate API for US nodes...\" -ForegroundColor Cyan | \n|  | try { | \n|  | $rawApiData = Invoke-RestMethod -Uri \"http://www.vpngate.net/api/iphone/\" -UseBasicParsing -ErrorAction Stop | \n|  | } catch { | \n|  | Write-Error \"VPN Gate API is unreachable.\" | \n|  | exit 1 | \n|  | } | \n|  |  | \n|  | # Raw data processing: removes unnecessary lines and fixes the header | \n|  | $validLines = @() | \n|  | $isHeader = $true | \n|  |  | \n|  | foreach ($line in ($rawApiData -split \"\\r?\\n\")) { | \n|  | # Skip empty lines or VPN Gate structural metadata (e.g., *vpn_servers) | \n|  | if ([string]::IsNullOrWhiteSpace($line) -or $line.StartsWith(\"*\")) { | \n|  | continue | \n|  | } | \n|  |  | \n|  | # Remove initial '#' character exclusively from the header line | \n|  | if ($line.StartsWith(\"#\") -and $isHeader) { | \n|  | $line = $line.Substring(1) | \n|  | $isHeader = $false | \n|  | } | \n|  |  | \n|  | $validLines += $line | \n|  | } | \n|  |  | \n|  | # Parse CSV now correctly formatted with real headers | \n|  | $usNodes = $validLines \\| ConvertFrom-Csv \\| Where-Object { | \n|  | $_.CountryShort -eq \"US\" -and -not [string]::IsNullOrWhiteSpace($_.OpenVPN_ConfigData_Base64) | \n|  | } \\| Sort-Object -Property { [long]$_.Speed } -Descending \\| Select-Object -First 3 | \n|  |  | \n|  | # --- 4. Profile Import and Connection --- | \n|  | $tunnelEstablished = $false | \n|  | $interfaceIndex = $null | \n|  |  | \n|  | foreach ($node in $usNodes) { | \n|  | Write-Host \"Testing US Node: $($node.HostName) - $([math]::Round($node.Speed / 1Mb, 2)) Mbps\" -ForegroundColor Cyan | \n|  |  | \n|  | $ovpnBytes = [System.Convert]::FromBase64String($node.OpenVPN_ConfigData_Base64) | \n|  | $ovpnConfig = [System.Text.Encoding]::UTF8.GetString($ovpnBytes) | \n|  |  | \n|  | if ($ovpnConfig -notmatch \"route-nopull\") { | \n|  | $ovpnConfig += \"`nroute-nopull` n\" | \n|  | } | \n|  | Set-Content -Path $ovpnPath -Value $ovpnConfig -Encoding UTF8 | \n|  |  | \n|  | Write-Host \"Importing profile into OpenVPN Connect V3...\" -ForegroundColor DarkCyan | \n|  | try { | \n|  | Start-Process -FilePath $openVpnExe -ArgumentList \"--import-profile=`\"$ovpnPath`\"\" -Wait -ErrorAction Stop | \n|  | } catch { | \n|  | Write-Warning \"Failed to import profile for node $($node.HostName). Trying next...\" | \n|  | continue | \n|  | } | \n|  |  | \n|  | Write-Host \"Initiating VPN connection...\" -ForegroundColor DarkCyan | \n|  | Start-Process -FilePath $openVpnExe -ArgumentList \"--connect=`\"$ovpnPath`\"\" -WindowStyle Hidden | \n|  |  | \n|  | Write-Host \"Waiting for network adapter initialization...\" -ForegroundColor Gray | \n|  | $retryCount = 0 | \n|  | while ($retryCount -lt 10) { | \n|  | Start-Sleep -Seconds 2 | \n|  | $tapAdapter = Get-NetAdapter \\| Where-Object { $_.InterfaceDescription -match \"OpenVPN\\|TAP\\|TUN\" -and $_.Status -eq \"Up\" } \\| Select-Object -First 1 | \n|  |  | \n|  | if ($tapAdapter) { | \n|  | $interfaceIndex = $tapAdapter.ifIndex | \n|  | $tunnelEstablished = $true | \n|  | break | \n|  | } | \n|  | $retryCount++ | \n|  | } | \n|  |  | \n|  | if ($tunnelEstablished) { | \n|  | Write-Host \"OpenVPN connection established on Interface Index: $interfaceIndex\" -ForegroundColor Green | \n|  | break | \n|  | } else { | \n|  | Write-Warning \"Connection timed out for node $($node.HostName). Attempting next node...\" | \n|  | } | \n|  | } | \n|  |  | \n|  | if (-not $tunnelEstablished) { | \n|  | Write-Error \"Failed to establish OpenVPN connection with any US node.\" | \n|  | exit 1 | \n|  | } | \n|  |  | \n|  | # --- 5. Domain IP Resolution and Static Routing --- | \n|  | Write-Host \"Resolving target domains and configuring static split routes...\" -ForegroundColor Cyan | \n|  | Start-Sleep -Seconds 2 | \n|  |  | \n|  | if ($interfaceIndex) { | \n|  | foreach ($domain in $targetDomains) { | \n|  | try { | \n|  | $ips = [System.Net.Dns]::GetHostAddresses($domain) | \n|  | foreach ($ip in $ips) { | \n|  | if ($ip.AddressFamily -eq [System.Net.Sockets.AddressFamily]::InterNetwork) { | \n|  | route add $ip.IPAddress mask 255.255.255.255 0.0.0.0 IF $interfaceIndex /METRIC 5 2>&1 \\| Out-Null | \n|  | Write-Host \"Routed $domain ($($ip.IPAddress)) via OpenVPN adapter.\" -ForegroundColor DarkGreen | \n|  | } | \n|  | } | \n|  | } catch { | \n|  | Write-Warning \"Could not resolve domain: $domain\" | \n|  | } | \n|  | } | \n|  | } else { | \n|  | Write-Warning \"OpenVPN network adapter index missing. Traffic routing bypassed.\" | \n|  | } | \n|  |  | \n|  | # --- 6. Google Chrome Configuration and Launch --- | \n|  | $chromePaths = @( | \n|  | \"$env:ProgramFiles\\Google\\Chrome\\Application\\chrome.exe\", | \n|  | \"${env:ProgramFiles(x86)}\\Google\\Chrome\\Application\\chrome.exe\", | \n|  | \"$env:LOCALAPPDATA\\Google\\Chrome\\Application\\chrome.exe\", | \n|  | (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe\" -Name \"\" -ErrorAction SilentlyContinue).'(default)' | \n|  | ) | \n|  | $chromePath = $chromePaths \\| Where-Object { -not [string]::IsNullOrWhiteSpace($_) -and (Test-Path $_) } \\| Select-Object -First 1 | \n|  |  | \n|  | if (-not $chromePath) { | \n|  | Write-Error \"Google Chrome executable not found.\" | \n|  | exit 1 | \n|  | } | \n|  |  | \n|  | $featuresList = @( | \n|  | \"Glic\",\"GlicSidePanel\",\"GlicActor\",\"GlicUnifiedFreScreen\",\"GlicEntrypointVariations\", | \n|  | \"GlicActorAutofill\",\"GlicActorCursor\",\"GlicActorScriptTools\",\"GlicCaptureRegion\", | \n|  | \"GlicDefaultToLastActiveConversation\",\"GlicExperimentalTriggering\",\"GlicPdfSummarize\", | \n|  | \"GlicSelectionPrompt\",\"GlicTabGroups\",\"GlicZeroStateSuggestions\",\"SyncAiThreads\", | \n|  | \"SyncGeminiThreads\",\"ContextualTasksSidePanel\",\"PromptAPI\",\"PromptAPIMultimodalInput\", | \n|  | \"SummarizerAPI\",\"WriterAPI\",\"RewriterAPI\",\"ProofreaderAPI\" | \n|  | ) -join \",\" | \n|  |  | \n|  | $arguments = @( | \n|  | \"--variations-override-country=us\", | \n|  | \"--lang=en-US\", | \n|  | \"--enable-features=$featuresList\", | \n|  | \"--disable-session-crashed-bubble\" | \n|  | ) | \n|  |  | \n|  | Get-Process -Name \"chrome\" -ErrorAction SilentlyContinue \\| Stop-Process -Force | \n|  | Start-Sleep -Seconds 2 | \n|  |  | \n|  | Write-Host \"Launching Google Chrome with domain-specific split-routing...\" -ForegroundColor Green | \n|  | Start-Process -FilePath $chromePath -ArgumentList $arguments | \n|  | Write-Host \"Setup Complete!\" -ForegroundColor Green | \n|  |  | \n|  | # --- 7. Final prompt to keep the window open --- | \n|  | Write-Host \"\" | \n|  | Write-Host \"=====================================================\" -ForegroundColor Cyan | \n|  | Write-Host \"Operations completed. Check the log above if there are any warnings.\" -ForegroundColor Yellow | \n|  | Read-Host \"Press ENTER to close this window\" |", "url": "https://wpnews.pro/news/launches-google-chrome-configured-with-us-country-overrides-to-enable-ai-feature", "canonical_source": "https://gist.github.com/VisualBoy/ed5297943d65a4b927b754d6ed7790a9", "published_at": "2026-09-14 00:23:27+00:00", "updated_at": "2026-09-14 00:55:27.075069+00:00", "lang": "en", "topics": ["ai-tools", "ai-products", "developer-tools"], "entities": ["Google", "Gemini", "OpenVPN Connect", "VPN Gate", "Google Chrome", "PowerShell", "Windows"], "alternates": {"html": "https://wpnews.pro/news/launches-google-chrome-configured-with-us-country-overrides-to-enable-ai-feature", "markdown": "https://wpnews.pro/news/launches-google-chrome-configured-with-us-country-overrides-to-enable-ai-feature.md", "text": "https://wpnews.pro/news/launches-google-chrome-configured-with-us-country-overrides-to-enable-ai-feature.txt", "jsonld": "https://wpnews.pro/news/launches-google-chrome-configured-with-us-country-overrides-to-enable-ai-feature.jsonld"}}