Nếu bạn sử dụng proxy Squid để ẩn địa chỉ IP hoặc tạo proxy cho các VPS, có thể bạn sẽ gặp tình trạng khi truy cập Google lại bị chuyển hướng sang trang google.hk (Google Hong Kong). Điều này gây khó chịu khi bạn mong muốn sử dụng Google phiên bản Việt Nam hoặc quốc tế. Vậy nguyên nhân do đâu và cách khắc phục như thế nào? Bài viết này sẽ hướng dẫn chi tiết cách sửa lỗi này.
Có một số nguyên nhân chính dẫn đến việc Google tự động chuyển hướng sang trang google.hk khi sử dụng proxy Squid, bao gồm:
Dưới đây là cấu hình tối ưu giúp ẩn danh hoàn toàn khi sử dụng proxy Squid
# Xóa mọi header để ẩn danh
via off
forwarded_for delete
request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent deny all
request_header_access Cookie deny all
request_header_access Referer deny all
request_header_access X-Forwarded-For deny all
request_header_access Via deny all
request_header_access From deny all
request_header_access All deny all
# Cấu hình cổng proxy
http_port 57254
# DNS
dns_nameservers 8.8.8.8 1.1.1.1
Sau khi chỉnh sửa cấu hình, bạn cần khởi động lại Squid để áp dụng thay đổi
sudo systemctl restart squid
Truy cập vào cài đặt trình duyệt và xóa cache, cookie để đảm bảo trình duyệt không còn lưu thông tin từ google.hk.
Nếu vẫn bị chuyển hướng, bạn có thể truy cập Google phiên bản quốc tế bằng cách vào link:
Với các bước trên, bạn có thể dễ dàng khắc phục lỗi Google chuyển hướng sang google.hk khi sử dụng proxy Squid. Nếu bạn vẫn gặp vấn đề, hãy kiểm tra lại IP thực của proxy để đảm bảo không bị nhận diện nhầm. Hy vọng bài viết giúp bạn giải quyết vấn đề nhanh chóng!
dịch vụ chất lượng khách hàng tin tưởng