项目作者: EmericLee

项目描述 :
A prxoy gate docker that provide squid http proxy & v2ray Server through a ikev2 vpn connection powered by strongswan.
高级语言: Shell
项目地址: git://github.com/EmericLee/stronggate.git
创建时间: 2019-06-07T15:35:28Z
项目社区:https://github.com/EmericLee/stronggate

开源协议:

下载


stronggate

A Docker Image provide prxoy gate server with squid http proxy & v2ray Server through a ikev2 vpn connection powered by strongswan.

By emericlee@gmail.com

Docker hub: https://hub.docker.com/r/emericlee/stronggate/tags

Docker Image name: emericlee/stronggate

Quick EXAMPLE

Example A.Run image manually and enter command shell

  1. docker run -it --rm --name vpnpure --privileged --cap-add ALL -v /lib/modules:/lib/modules emericlee/stronggate sh

Example B.Run image manually with full service

Modify the following command line as needed and run it. abspath-to-stronggate-config-files is the directory for aggregation of config files , see config files .

  1. docker run -dt \
  2. --restart unless-stopped \
  3. --name vpnpure \
  4. --privileged \
  5. --cap-add ALL \
  6. -v /lib/modules:/lib/modules \
  7. -p 20005:3128 \
  8. -p 10005:10005 \
  9. -v /abspath-to-stronggate-config-files:/etc/stronggate \
  10. emericlee/stronggate

Example C Run image by docker-compose

Create a compose file like below and up it.

  1. #example:docker-compose for stronggate
  2. version: '3'
  3. services:
  4. vpnname:
  5. image: emericlee\stronggate
  6. hostname: vpnname
  7. container_name: vpnname
  8. volumes:
  9. - /lib/modules:/lib/modules
  10. - ./config:/etc/stronggate #config is the directory for aggregation of config files. see `config files`
  11. privileged: true
  12. cap_add:
  13. - ALL
  14. restart: always
  15. ports:
  16. - "20005:3128" #squid http proxy
  17. - "20006:1080" #v2ray Server
  18. #entrypoint: /entrypoint.sh #can overwrite by you own entry script

Reference

Ports

The follow port should publish as needed.

  1. ports:
  2. - "xxxx:3128" #http proxy(squid http)
  3. - "xxxx:1080" #v2ray Server

Config files

The follow files are config files for strongswan & squid & shadowsocks. They was aggregated at /etc/stronggate in container and map(link) to the location where each service will load by default .
Each profile can be edited according to the corresponding documentation.You can modify them in container directly or overwrite them by seting up volume map from host.

  1. [aggregation location] <== ln ==> [actul location]
  2. /etc/stronggate/ipsec.conf /etc/ipsec.conf
  3. /etc/stronggate/ipsec.secrets /etc/ipsec.secrets
  4. /etc/stronggate/cacerts/* /etc/ipsec.d/cacerts/*
  5. /etc/stronggate/squid.conf /etc/squid/squid.conf
  6. /etc/stronggate/v2ray.json /etc/v2ray/config.json