on_unsupported_protocol not work?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

on_unsupported_protocol not work?

钱国正
Hi guys:

I config squid.conf with

```
acl subnet src 192.168.0.0/16
on_unsupported_protocol tunnel subnet
```

But I still got the error message as below, did I do something wrong ?

2017/03/16 17:36:46.496| 5,2| TcpAcceptor.cc(226) doAccept: New connection on FD 15
2017/03/16 17:36:46.496| 5,2| TcpAcceptor.cc(315) acceptNext: connection on local=[::]:3128 remote=[::] FD 15 flags=41
2017/03/16 17:36:46.499| 33,2| Http1Server.cc(101) buildHttpRequest: Invalid Request
2017/03/16 17:36:46.499| 4,2| errorpage.cc(1260) BuildContent: No existing error page language negotiated for ERR_PROTOCOL_UNKNOWN. Using default error file.
2017/03/16 17:36:46.499| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:46.499| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:46.499| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:46.499| 88,2| client_side_reply.cc(2084) processReplyAccessResult: The reply for NONE error:invalid-request is ALLOWED, because it matched (access_log /mnt/squid/access.log line)
2017/03/16 17:36:46.500| 11,2| Stream.cc(266) sendStartOfMessage: HTTP Client local=157.255.139.239:80 remote=192.168.56.167:55904 FD 14 flags=33
2017/03/16 17:36:46.500| 11,2| Stream.cc(267) sendStartOfMessage: HTTP Client REPLY:
---------
HTTP/1.1 400 Bad Request
Server: squid/4.0.18
Mime-Version: 1.0
Date: Thu, 16 Mar 2017 09:36:46 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 53
X-Squid-Error: ERR_PROTOCOL_UNKNOWN 0
Content-Language: en
X-Cache: MISS from MagicWiFi
X-Cache-Lookup: NONE from MagicWiFi:3128
Connection: close


----------
2017/03/16 17:36:46.500| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:46.500| 33,2| client_side.cc(896) kick: local=157.255.139.239:80 remote=192.168.56.167:55904 flags=33 Connection was closed
2017/03/16 17:36:46.500| 33,2| client_side.cc(588) swanSong: local=157.255.139.239:80 remote=192.168.56.167:55904 flags=33
2017/03/16 17:36:53.314| 5,2| TcpAcceptor.cc(226) doAccept: New connection on FD 15
2017/03/16 17:36:53.314| 5,2| TcpAcceptor.cc(315) acceptNext: connection on local=[::]:3128 remote=[::] FD 15 flags=41
2017/03/16 17:36:53.320| 33,2| Http1Server.cc(101) buildHttpRequest: Invalid Request
2017/03/16 17:36:53.320| 4,2| errorpage.cc(1260) BuildContent: No existing error page language negotiated for ERR_PROTOCOL_UNKNOWN. Using default error file.
2017/03/16 17:36:53.320| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:53.320| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:53.321| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:53.321| 88,2| client_side_reply.cc(2084) processReplyAccessResult: The reply for NONE error:invalid-request is ALLOWED, because it matched (access_log /mnt/squid/access.log line)
2017/03/16 17:36:53.321| 11,2| Stream.cc(266) sendStartOfMessage: HTTP Client local=157.255.139.239:80 remote=192.168.56.167:55905 FD 14 flags=33
2017/03/16 17:36:53.321| 11,2| Stream.cc(267) sendStartOfMessage: HTTP Client REPLY:
---------
HTTP/1.1 400 Bad Request
Server: squid/4.0.18
Mime-Version: 1.0
Date: Thu, 16 Mar 2017 09:36:53 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 53
X-Squid-Error: ERR_PROTOCOL_UNKNOWN 0
Content-Language: en
X-Cache: MISS from MagicWiFi
X-Cache-Lookup: NONE from MagicWiFi:3128
Connection: close


----------
2017/03/16 17:36:53.321| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:53.321| 33,2| client_side.cc(896) kick: local=157.255.139.239:80 remote=192.168.56.167:55905 flags=33 Connection was closed
2017/03/16 17:36:53.321| 33,2| client_side.cc(588) swanSong: local=157.255.139.239:80 remote=192.168.56.167:55905 flags=33
2017/03/16 17:36:58.005| 5,2| TcpAcceptor.cc(226) doAccept: New connection on FD 15
2017/03/16 17:36:58.005| 5,2| TcpAcceptor.cc(315) acceptNext: connection on local=[::]:3128 remote=[::] FD 15 flags=41
2017/03/16 17:36:58.013| 33,2| Http1Server.cc(101) buildHttpRequest: Invalid Request
2017/03/16 17:36:58.013| 4,2| errorpage.cc(1260) BuildContent: No existing error page language negotiated for ERR_PROTOCOL_UNKNOWN. Using default error file.
2017/03/16 17:36:58.013| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:58.013| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:58.013| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:58.013| 88,2| client_side_reply.cc(2084) processReplyAccessResult: The reply for NONE error:invalid-request is ALLOWED, because it matched (access_log /mnt/squid/access.log line)
2017/03/16 17:36:58.014| 11,2| Stream.cc(266) sendStartOfMessage: HTTP Client local=157.255.40.106:80 remote=192.168.56.167:55906 FD 14 flags=33
2017/03/16 17:36:58.014| 11,2| Stream.cc(267) sendStartOfMessage: HTTP Client REPLY:
---------
HTTP/1.1 400 Bad Request
Server: squid/4.0.18
Mime-Version: 1.0
Date: Thu, 16 Mar 2017 09:36:58 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 53
X-Squid-Error: ERR_PROTOCOL_UNKNOWN 0
Content-Language: en
X-Cache: MISS from MagicWiFi
X-Cache-Lookup: NONE from MagicWiFi:3128
Connection: close


----------
2017/03/16 17:36:58.014| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:58.014| 33,2| client_side.cc(896) kick: local=157.255.40.106:80 remote=192.168.56.167:55906 flags=33 Connection was closed
2017/03/16 17:36:58.014| 33,2| client_side.cc(588) swanSong: local=157.255.40.106:80 remote=192.168.56.167:55906 flags=33
2017/03/16 17:36:58.595| 5,2| TcpAcceptor.cc(226) doAccept: New connection on FD 15
2017/03/16 17:36:58.595| 5,2| TcpAcceptor.cc(315) acceptNext: connection on local=[::]:3128 remote=[::] FD 15 flags=41
2017/03/16 17:36:58.599| 33,2| Http1Server.cc(101) buildHttpRequest: Invalid Request
2017/03/16 17:36:58.599| 4,2| errorpage.cc(1260) BuildContent: No existing error page language negotiated for ERR_PROTOCOL_UNKNOWN. Using default error file.
2017/03/16 17:36:58.599| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:58.599| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:58.599| 20,2| store.cc(990) checkCachable: StoreEntry::checkCachable: NO: not cachable
2017/03/16 17:36:58.599| 88,2| client_side_reply.cc(2084) processReplyAccessResult: The reply for NONE error:invalid-request is ALLOWED, because it matched (access_log /mnt/squid/access.log line)
2017/03/16 17:36:58.599| 11,2| Stream.cc(266) sendStartOfMessage: HTTP Client local=157.255.40.106:80 remote=192.168.56.167:55907 FD 14 flags=33
2017/03/16 17:36:58.599| 11,2| Stream.cc(267) sendStartOfMessage: HTTP Client REPLY:
---------
HTTP/1.1 400 Bad Request
Server: squid/4.0.18
Mime-Version: 1.0
Date: Thu, 16 Mar 2017 09:36:58 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 53
X-Squid-Error: ERR_PROTOCOL_UNKNOWN 0
Content-Language: en
X-Cache: MISS from MagicWiFi
X-Cache-Lookup: NONE from MagicWiFi:3128
Connection: close







------------------

钱国正 Richard

嵌入式工程师

深圳市柠檬网联科技股份有限公司

Shenzhen Lemon Network Technology CO.,Ltd


手机/Mobile13538273761

电话/Tel0755-86699030

地址/Add:深圳市南山区科技园南十二路长虹科技大厦1710-1711


如阁下非电子邮件所指定之收件人或收件机构,谨请立即通知本人;亦请勿使用、截留、透露、复印、打印、转发或用于其他任何目的或向任何人披露其内容或其附件。

If you are not the intended recipient, please notify us immediately and you must not use, retain, disclose, copy, print, forword or disseminate this email or any attachments.

 

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: on_unsupported_protocol not work?

Alex Rousskov
On 03/16/2017 07:37 PM, 钱国正 wrote:

> acl subnet src 192.168.0.0/16
> on_unsupported_protocol tunnel subnet

The on_unsupported_protocol directive does not (and cannot) work for
cases where Squid does not know where the client is trying to get to:

> Currently, this directive has effect on intercepted connections and
> bumped tunnels only. Other cases are not supported because Squid
> cannot know the intended destination of other traffic.

AFAICT from your logs, Squid was not bumping a CONNECT tunnel. Did Squid
intercept the connection with a non-HTTP request? What is your http_port
3128 configuration in squid.conf?

And if your Squid is not intercepting (i.e., it works as a regular HTTP
forward proxy), then why is it receiving non-HTTP requests and what
would you like Squid to do with them?

Alex.


> 2017/03/16 17:36:46.496| 5,2| TcpAcceptor.cc(315) acceptNext: connection on local=[::]:3128 remote=[::] FD 15 flags=41
> 2017/03/16 17:36:46.499| 33,2| Http1Server.cc(101) buildHttpRequest: Invalid Request
> 2017/03/16 17:36:46.499| 4,2| errorpage.cc(1260) BuildContent: No existing error page language negotiated for ERR_PROTOCOL_UNKNOWN.

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Loading...