Hot answers tagged

7

Both Perl and Python (and probably Ruby as well) have simple kits that you can use to quickly build simple HTTP proxies. In Perl, use HTTP::Proxy. Here's the 3-line example from the documentation. Add filters to filter, log or rewrite requests or responses; see the documentation for examples. use HTTP::Proxy; my $proxy = HTTP::Proxy->new( port => ...


7

1) Squid is a special proxy for http and https traffic. As it knows this protocol it can offer some advanced features like caching, filtering, rewrite rules, dns resolving. All web browsers know how to handle http proxies as it's part of that protocol spec. Additionally Squid can act as a transparent proxy where you don't configure your web browser to use ...


6

Netcat is not a specialized HTTP client. Connecting through a proxy server for Netcat thus means creating a TCP connection through the server, which is why it expects a SOCKS or HTTPS proxy with the -x argument, specified by -X: -X proxy_protocol Requests that nc should use the specified protocol when talking to the proxy server. ...


6

Your allow google\..* is matching every URL with google. in it. The allow is matched first so access is allowed. Your rule will also be allowing any requests with google. anywhere in the URL, like http://example.com/google.asp Additionally, Google tries to do most requests via SSL so a deny via url_regex plays no part in these requests (There is no URL in ...


5

Use the ASCII Punycode version of the domain name instead: xn--helfende-hnde-kfb.de


5

This may not be the best solution, but if you use any proxy then it will have a specific host:port so the netcat solution with still work, albeit you'll have to pick apart the proxy meta-data to make sense of it. The easiest way to do this might be to use any random anonymization proxy out there and just channel all the traffic through netcat. (I.e., set ...


5

The usual solution for this problem is to use rotate the logfiles so that the current logfile only contains current entries, rather than removing outdated entries from the file. This is all handled by the logrotate program. The following configuration should do approximately what you want. It will keep the last 6 months of log entries from /var/squid/logs/...


5

You are right, even with minimal installation, the current FreeBSD requires a minimum of 600 MB, especially if you go for a amd64 release. There is still some options left: Using an "old" 7.x or 8.x (i386) release I tried to install an "old" 7.3 (i386) with everything to minimal and it took 270 MB. Assuming your machine is old enough, you will not care ...


4

You need to specify that the rule should go into the nat table, additionally DNAT commands need to go the PREROUTING chain and you need to be careful that you do not generate a loop. iptables -t nat -I PREROUTING -i br-lan -s ! 192.168.1.196 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.196:3128 The default table is the filter table. Do not ...


4

One method would be to make use of this directive in the squid.conf file to get the log file to show FQDNs instead of the IPs: log_fqdn on Source: http://www.squid-cache.org/Doc/config/log_fqdn/ But this will omit the <IP> <Name> format that you're showing in your question. For that if you look at the documentation for the logformat directive ...


3

You can't make everything transparent with Squid. Only HTTP can be transparent and HTTPS with a non recommended hack. For FTP, you need a pure FTP proxy like Frox. Anyway, it doesn't make any sense to use proxies if you want to make everything transparent, use NAT. HTTP could be useful only because the cache.


3

Depending on which browser you are using, using a proxy auto-config file might work best. Most modern browsers will support this. Something like this should be a good start: function FindProxyForURL(url, host) { isp = "PROXY ip_address:port; DIRECT"; tor = "SOCKS 127.0.0.1:9050"; if (shExpMatch(host,"*.onion")) { return tor; } ...


3

From here. me@host:~$ date -d @1286536351.746 Fri Oct 8 11:12:31 UTC 2010


3

OK, I got it now. After a few check on the FreeBSD forum, I can now confirm that FreeBSD jails act a bit like some Swiss cheese as long as SHM objects are concerned. Indeed, FreeBSD does not provide any isolation at all for SHM objects: all jails can access all SHM objects, system-wide, with no way to prevent it. The error mentioned in this question is ...


2

It sounds like it needs to startup later in the boot sequence. Maybe it is binding to the wrong interface or the interface you use is not available when it starts. Check the system startup logs for any messages squid is telling you when it firs starts, then consider changing the startup script priority number. You could also set a reboot in your rc.local ...


2

You want to block any and all HTTPS sites? You need to do this with a firewall on your router. Blocking it in Squid won't prevent people from circumventing it unless the firewall on your router also blocks it. If your router blocks it than what squid does is irrelevant. Better yet, set the firewall to block all outgoing TCP connections except for port 80 ...


2

I can answer how to manage the bandwidth once you know what IP is in which group. You can use hierarchical token bucket to allocate three groups. 10 Group A 20 Group B 30 Unknown traffic for/from non-AD devices in your network #Create egress shaping $TC qdisc add dev eth0 root handle 1: htb default 20 r2q 50 $TC class add dev eth0 parent 1: classid 1:1 ...


2

Thanks to sr_, I used driftnet: sudo driftnet -i eth0 -a -d ./browserPic


2

Take a look at socat: http://www.dest-unreach.org/socat/doc/README


2

You don't need --uid-owner in PREROUTING, you need it in OUTPUT (like in your example).


2

Here you can look at the Squid configuration directives on this page maintained by the Squid project. This page shows the different directives and which versions of squid they're available in. The page is titled: Squid configuration directives.   


2

Given their docs: http://wiki.squid-cache.org/SquidFaq/SquidAcl#The_Basics:_How_the_parts_fit_together dstdom_regex: destination (server) regular expression pattern matching This should match only the server (i.e. the www.google.ru part in your example), while you want to use it to block a specific URL (i.e. server + path). I think you need to use ...


2

I found this tutorial: How to cache openSUSE repositories with Squid. excerpt How to make your local Squid web cache work with openSUSE repositories and the openSUSE network installation process. In effect, how to run a fully autonomous, local on-demand repository mirror. Even with a high-speed ADSL internet connection, savings of up to 60% are easily ...


2

If your OpenSSL library is dynamically linked to the Squid executable then it will use the current OpenSSL library. It has no choice as the older one will have been removed during the system upgrade. On the other hand, if Squid was statically linked at compile time to the OpenSSL library, it will be using the old one. Run:- ldd <path to squid ...


2

Due to the fact that SSL is end-to-end encryption, a proxy such as Squid normally knows much less about an HTTPS request than it does on HTTP (http://wiki.squid-cache.org/Features/HTTPS#CONNECT_tunnel): [Many] common parts of the request URL do not exist in a CONNECT request: the URL scheme or protocol (e.g., http://, https://, ftp://, voip://, ...


2

By default the second column represents the time in milliseconds the request took: The native format for Squid The format is: time elapsed remotehost code/status bytes method URL rfc931 peerstatus/peerhost type See also http://wiki.squid-cache.org/Features/LogFormat for more details about the logformat.


2

TXT_DB error number 2 means DB_ERROR_INDEX_CLASH. You've tried to submit a certificate into the OpenSSL CA database with the same index twice. The cause of this is usually submitting a certificate to the database that contains the same Serial Number or same Common Name. For the latter, check for the unique_subject option in the intermediate/openssl.conf ...


1

your log file size is zero since from July 25, that's why you are facing this issue -rw-r-----. 1 squid squid 0 Jul 25 03:49 access.log So just check your disk space and inode, may be because of this squid is unable to generate logs


1

It appears Skype use SOCKS or HTTPS proxies. Squid is neither. For incoming connections you need to NAT incoming connections to your PC using the port specified in your Skype settings. For outgoing connections you need to open the ephemeral ports your PC uses. Skype is not a good citizen in protected environments. If your firewall support upnp, then ...



Only top voted, non community-wiki answers of a minimum length are eligible