首页 > 解决方案 > 鱿鱼不显示位置谷歌分析

问题描述

我在公司的服务器上安装了 Squid

100% 工作

CentOS cents-release-7-9.2009.1.el7.centos.x86_64

    [root@localhost ~]# systemctl status squid
    ● squid.service - Squid caching proxy
       Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled; vendor preset: disabled)
       Active: active (running) since Mon 2021-08-02 11:55:15 -04; 15s ago
      Process: 3214 ExecStop=/usr/sbin/squid -k shutdown -f $SQUID_CONF (code=exited, status=0/SUCCESS)
      Process: 3225 ExecStart=/usr/sbin/squid $SQUID_OPTS -f $SQUID_CONF (code=exited, status=0/SUCCESS)
      Process: 3217 ExecStartPre=/usr/libexec/squid/cache_swap.sh (code=exited, status=0/SUCCESS)
     Main PID: 3226 (squid)
       CGroup: /system.slice/squid.service
               ├─3226 /usr/sbin/squid -f /etc/squid/squid.conf
               ├─3228 (squid-1) -f /etc/squid/squid.conf
               ├─3229 (logfile-daemon) /var/log/squid/access.log
               └─3230 (unlinked)

Aug 02 11:55:15 domains.local systemd[1]: Starting Squid caching proxy...
Aug 02 11:55:15 domain.local squid[3226]: Squid Parent: will start 1 kids
Aug 02 11:55:15 domain.local squid[3226]: Squid Parent: (squid-1) process 3228 started
Aug 02 11:55:15 domain.local systemd[1]: Started Squid caching proxy.

[root@localhost ~]# cat /etc/squid/squid.conf
#
# Recommended minimum configuration:
#

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8    # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) 

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl CONNECT method CONNECT

### Meu
via off
forwarded_for off

#
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 8213
#http_port 8213 intercept

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256
cache_dir ufs /var/spool/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

#
# Add any of your own refresh_pattern entries above these.
#
#refresh_pattern ^ftp:          1440    20%     10080
#refresh_pattern ^gopher:       1440    0%      1440
#refresh_pattern -i (/cgi-bin/|\?) 0    0%      0
#refresh_pattern .              0       20%     4320

refresh_pattern ^ftp:       1440    20% 10080
refresh_pattern ^gopher:    1440    0%  1440
refresh_pattern -i (/cgi-bin/|\?) 0 0%  0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern -i \.(gif|png|jp?g|ico|bmp|tiff?)$ 10080 95% 43200
refresh_pattern -i \.(rpm|cab|deb|exe|msi|msu|zip|tar|xz|bz|bz2|lzma|gz|tgz|rar|bin|7z|doc?|xls?|ppt?|pdf|nth|psd|sis)$ 10080 90% 43200
refresh_pattern -i \.(avi|iso|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|axd)$ 43200 95% 432000
refresh_pattern -i \.(html|htm|css|js)$ 1440 75% 40320
refresh_pattern -i \.index.(html|htm)$ 0 75% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 1440 90% 10080

quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 100
store_avg_object_size 13 KB
visible_hostname local

cache_effective_user squid
cache_effective_group squid

我们在公司有一个网站,我关注谷歌分析

如果在没有代理的情况下访问该站点,它会显示位置(国家、州、城市)。如果向浏览器添加代理:未设置

鱿鱼会阻挡任何东西吗?

标签: google-analyticssquid

解决方案


推荐阅读