first commit
This commit is contained in:
52
config/config.yaml
Normal file
52
config/config.yaml
Normal file
@@ -0,0 +1,52 @@
|
||||
# 监听和网络设置
|
||||
mixed-port: 7890
|
||||
allow-lan: true
|
||||
bind-address: 0.0.0.0
|
||||
|
||||
# API 控制器设置
|
||||
external-controller: 0.0.0.0:9090
|
||||
secret: "your_secret_here"
|
||||
|
||||
log-level: info
|
||||
mode: rule
|
||||
|
||||
# 代理节点自动订阅设置
|
||||
proxy-providers:
|
||||
sub:
|
||||
type: http
|
||||
url: "https://app.mitce.net/?sid=303534&token=srveqevu"
|
||||
interval: 3600
|
||||
path: ./providers/sub.yaml
|
||||
health-check:
|
||||
enable: true
|
||||
url: https://www.gstatic.com/generate_204
|
||||
interval: 300
|
||||
|
||||
proxy-groups:
|
||||
- name: Proxy
|
||||
type: select
|
||||
use:
|
||||
- sub
|
||||
|
||||
# 路由规则
|
||||
rules:
|
||||
- DOMAIN,app.mitce.net,DIRECT
|
||||
- GEOIP,CN,DIRECT
|
||||
- MATCH,Proxy
|
||||
|
||||
# DNS 设置
|
||||
dns:
|
||||
enable: true
|
||||
listen: 127.0.0.1:1053
|
||||
enhanced-mode: fake-ip
|
||||
fake-ip-range: 198.18.0.0/16
|
||||
nameserver:
|
||||
- 223.5.5.5
|
||||
- https://dns.alidns.com/dns-query
|
||||
- https://adg.jmsu.top/dns-query
|
||||
- https://8.8.8.8/dns-query
|
||||
fallback:
|
||||
- https://doh.pub/dns-query
|
||||
fallback-filter:
|
||||
geoip: true
|
||||
geoip-code: CN
|
||||
62
docker-compose.yml
Normal file
62
docker-compose.yml
Normal file
@@ -0,0 +1,62 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
proxy:
|
||||
image: metacubex/mihomo
|
||||
container_name: proxy
|
||||
restart: always
|
||||
ports:
|
||||
- "127.0.0.1:7890:7890"
|
||||
- "127.0.0.1:9090:9090"
|
||||
volumes:
|
||||
- ./config:/root/.config/mihomo
|
||||
environment:
|
||||
- MIHOMO_SECRET="your_secret_here"
|
||||
- GEOIP_URL=https://ghproxy.dockless.eu.org/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb
|
||||
- GEOSITE_URL=https://ghproxy.dockless.eu.org/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q -T 2 --header='Authorization: Bearer your_secret_here' -O - http://127.0.0.1:9090/version >/dev/null"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
start_period: 30s
|
||||
networks:
|
||||
- proxy_net
|
||||
|
||||
jenkins:
|
||||
image: jenkins/jenkins:latest
|
||||
container_name: jenkins
|
||||
restart: always
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "50000:50000"
|
||||
volumes:
|
||||
- ./jenkins_home:/var/jenkins_home
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
networks:
|
||||
- proxy_net
|
||||
depends_on:
|
||||
proxy:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
JENKINS_UC: https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
|
||||
JENKINS_UC_EXPERIMENTAL: https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/experimental/update-center.json
|
||||
JENKINS_UC_DOWNLOAD: https://mirrors.tuna.tsinghua.edu.cn/jenkins
|
||||
HTTP_PROXY: http://proxy:7890
|
||||
http_proxy: http://proxy:7890
|
||||
HTTPS_PROXY: http://proxy:7890
|
||||
https_proxy: http://proxy:7890
|
||||
NO_PROXY: localhost,127.0.0.1,::1,jenkins,proxy,.local,.lan,.internal,.mirrors.tuna.tsinghua.edu.cn,.jenkins.io,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
|
||||
no_proxy: localhost,127.0.0.1,::1,jenkins,proxy,.local,.lan,.internal,.mirrors.tuna.tsinghua.edu.cn,.jenkins.io,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
|
||||
JAVA_TOOL_OPTIONS: >
|
||||
-Dhttp.proxyHost=proxy
|
||||
-Dhttp.proxyPort=7890
|
||||
-Dhttps.proxyHost=proxy
|
||||
-Dhttps.proxyPort=7890
|
||||
-Dhttp.nonProxyHosts=localhost|127.*|[::1]|jenkins|proxy|*.local|*.lan|*.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|*.jenkins.io|mirrors.tuna.tsinghua.edu.cn
|
||||
-Dhttps.nonProxyHosts=localhost|127.*|[::1]|jenkins|proxy|*.local|*.lan|*.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|*.jenkins.io|mirrors.tuna.tsinghua.edu.cn
|
||||
-Djdk.tls.client.protocols=TLSv1.2 -Dhttps.protocols=TLSv1.2
|
||||
|
||||
networks:
|
||||
proxy_net:
|
||||
external: true
|
||||
Reference in New Issue
Block a user