########
# TODO
#  服务端启用docker的squid，会出现 Forwarding loop detected for 错误
#  暂时不使用docker启动squid，而是以系统服务启动来对应
#  所以无法使用links，而使用extra_hosts来指定proxy服务器地址
########

########
# stunnel 监听客户端连接，并将请求转发到squid
########
stunnel-server:
  image: docker.alphabets.cn/stunnel:0.0.1
  container_name: stunnel-server
  hostname: stunnel
  restart: always
  command: /etc/stunnel/server.conf
  ports:
    - "13128:13128"
  volumes:
    - /etc/stunnel
#  links:
#    - squid-server:proxy
  extra_hosts:
    - "proxy:10.8.2.113"

########
# squid 代理服务器
########
#squid-server:
#  image: docker.alphabets.cn/squid:0.0.1
#  container_name: squid-server
#  hostname: squid
#  restart: always
#  volumes:
#   - /etc/squid
#   - /var/log/squid
#   - /data/squid
