全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 3683|回复: 12
打印 上一主题 下一主题

[Windows VPS] 求助 squid 有关

[复制链接]
跳转到指定楼层
1#
发表于 2012-2-24 22:20:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 iblicf 于 2012-2-24 22:26 编辑

我想在 vps 上用 squid +ssh 装个 v4/v6 代理,我本地只有 v4环境,~~ 下载 squid 最新的应该 3.1+ , 编译好了,配置不太懂,大概按网上找到的说明设置了一下,可以启动

配置文件如下:/etc/squid.conf

#--------------------------------------------
  这里边是我改的配置,只允许本地连接
#-----------------------------------------
  1. # Recommended minimum configuration:
  2. #
  3. acl manager proto cache_object
  4. acl localhost src 127.0.0.1/32 ::1
  5. acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

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

  14. acl SSL_ports port 443
  15. acl Safe_ports port 80          # http
  16. acl Safe_ports port 21          # ftp
  17. acl Safe_ports port 443         # https
  18. acl Safe_ports port 70          # gopher
  19. acl Safe_ports port 210         # wais
  20. acl Safe_ports port 1025-65535  # unregistered ports
  21. acl Safe_ports port 280         # http-mgmt
  22. acl Safe_ports port 488         # gss-http
  23. acl Safe_ports port 591         # filemaker
  24. acl Safe_ports port 777         # multiling http
  25. acl CONNECT method CONNECT

  26. #
  27. # Recommended minimum Access Permission configuration:
  28. #
  29. # Only allow cachemgr access from localhost
  30. http_access allow manager localhost
  31. http_access deny manager

  32. # Deny requests to certain unsafe ports
  33. http_access deny !Safe_ports

  34. # Deny CONNECT to other than secure SSL ports
  35. http_access deny CONNECT !SSL_ports
  36. http_access allow localnet
  37. http_access allow localhost

  38. # And finally deny all other access to this proxy
  39. http_access deny all

  40. # Squid normally listens to port 3128
  41. http_port 3128

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

  44. # ------------------------------------------------------------------
  45. cache_dir ufs /usr/local/squid/var/cache 100 16 256
  46. cache_effective_user squid
  47. cache_access_log /dev/null
  48. cache_log /dev/null
  49. cache_store_log /dev/null

  50. cache_mem 100 MB
  51. # -----------------------------------------------------------


  52. # Leave coredumps in the first cache dir
  53. coredump_dir /usr/local/squid/var/cache

  54. # Add any of your own refresh_pattern entries above these.
  55. refresh_pattern ^ftp:           1440    20%     10080
  56. refresh_pattern ^gopher:        1440    0%      1440
  57. refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
  58. refresh_pattern .               0       20%     4320
  59. Type  :quit<Enter>  to exit Vim                               87,1          Bot
  60. refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
  61. refresh_pattern .               0       20%     4320
复制代码
root@server:/etc# netstat -an |grep 3128
tcp6       0      0 :::3128                 :::*                    LISTEN

好像只有 v6 的 3128 端口在 listen ? 不知道是不是有问题,还要怎么设置 ?

====================================================
我是用 ff+ autoproxy + myentunel 连代理(原来只用 ssh),不知道 myentunel 怎么设置?

先谢过!
2#
发表于 2012-2-24 22:23:49 | 只看该作者
楼下知道
3#
发表于 2012-2-24 22:27:17 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
4#
 楼主| 发表于 2012-2-24 22:28:35 | 只看该作者
本帖最后由 iblicf 于 2012-2-24 23:01 编辑
cosence 发表于 2012-2-24 22:27
http代理用myentunel干嘛。。。


那个好歹有个图标,可以看到连接状态
5#
 楼主| 发表于 2012-2-24 23:01:41 | 只看该作者
===========
我试了一下  plink.exe -2 -P 22 -pw xxxxx  -L localhost:8888:localhost:3128  ssh_user@vps_address

v4网站可以(有图比/fb),v6 不行,可能配置有问题

求大侠指点
6#
发表于 2012-2-24 23:04:33 | 只看该作者
不懂.....
7#
发表于 2012-2-24 23:06:52 | 只看该作者
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      9386/(squid)
我的是这样的
8#
发表于 2012-2-24 23:29:57 | 只看该作者
edu.zzzcn.info
端口2012
9#
 楼主| 发表于 2012-2-25 00:10:06 | 只看该作者
lxfy 发表于 2012-2-24 23:29
edu.zzzcn.info
端口2012

这个需要 username/pass
10#
 楼主| 发表于 2012-2-25 00:10:47 | 只看该作者
wdlth 发表于 2012-2-24 23:06
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      9386/(squid)
我的是 ...

方便的话把配置贴一下 ?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-6-23 19:55 , Processed in 0.071509 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表