tcp:80でインターネットサービスに接続する必要があるデバイスがありますが、ネットワークに直接インターネットアクセスがありません。だから私はこれを解決するためにsquidプロキシを使用しています。
このデバイスでは、プロキシサーバー、ポート、ユーザー名、およびパスワードを入力できます。
デバイスがhttpGETの代わりにhttpCONNECTを使用していることがわかりました(これは私のブラウザーで正常に機能しています)。
デバイスが接続しようとすると、httpエラー400が発生します。squidaccess.logには、次の情報しか表示されません。
1338885433.033 0 172.22.140.129 TCP_DENIED / 400 1728 CONNECT:0-NONE /-text / html
そこで、パケットをキャプチャして、実際に何が起こっているかを確認しました。
デバイスからのリクエスト:
CONNECT mydomain.com:0 HTTP / 1.0 ユーザーエージェント:Sequencer / 5.5.0.5539
イカからの回答:
HTTP /1.0400不正なリクエスト イカ/2.7.STABLE9 X-Squid-エラー:ERR_INVALID_URL 0 選ぶ
私のsquid.conf:
auth_param基本プログラム/usr/ lib / squid / pam_auth auth_param基本的な子5 auth_param基本レルムSquidプロキシキャッシュWebサーバー auth_param基本資格ttl2時間 auth_param基本的な大文字と小文字を区別オフ acl all src all acl manager proto cache_object acl localhost src 127.0.0.1/32 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 acl localnet src 10.0.0.0/8#RFC1918可能な内部ネットワーク acl localnet src 172.16.0.0/12#RFC1918可能な内部ネットワーク acl localnet src 192.168.0.0/16#RFC1918可能な内部ネットワーク acl SSL_portsポート443#https acl SSL_portsポート563#snews acl SSL_portsポート873#rsync acl Safe_portsポート80#http acl Safe_portsポート21#ftp acl Safe_portsポート443#https acl Safe_portsポート70#gopher acl Safe_portsポート210#wais acl Safe_ports port 1025-65535#未登録のポート acl Safe_portsポート280#http-mgmt acl Safe_portsポート488#gss-http acl Safe_portsポート591#filemaker acl Safe_ports port 777#multiling http acl Safe_portsポート631#カップ acl Safe_portsポート873#rsync acl Safe_portsポート901#SWAT aclパージメソッドPURGE aclCONNECTメソッドCONNECT aclcheckpwproxy_auth必須 http_access allow manager localhost http_access deny manager http_accessはローカルホストのパージを許可します http_access拒否パージ http_access deny!Safe_ports http_access allow CONNECT http_access allow localnet http_access allow localhost http_access allow checkpw all http_accessすべて拒否 icp_accessはlocalnetを許可します icp_accessはすべてを拒否します http_port 3128 Hierarchy_stoplist cgi-bin? access_log /var/log/squid/access.log squid debug_options ALL、1 33,2 28,9 refresh_pattern ^ ftp:1440 20%10080 refresh_pattern ^ gopher:1440 0%1440 refresh_pattern -i(/ cgi-bin / | \?)0 0%0 refresh_pattern(リリース|パッケージ(.gz)*)$ 0 20%2880 refresh_pattern。0 20%4320 acl shoutcast rep_header X-HTTP09-First-Line^ICY。[0-9] upgrade_http0.9はshoutcastを拒否します aclapacherep_headerサーバー^Apache broken_vary_encodingはapacheを許可します extension_methods REPORT MERGE MKACTIVITY CHECKOUT hosts_file / etc / hosts forwarded_for off coredump_dir / var / spool / squid
ERR_INVALID_URLを取り除くための解決策はありますか?イカプロキシの概念を誤解しましたか、それともデバイスからのリクエストが無効ですか?
その他の情報が必要な場合はお知らせください。
よろしくお願いします、クリスチャン。