[新服务] 自建alpine docker + hideipnetwork hnet
date
Jun 7, 2023
slug
newservice-alpine-hideip-hnet
status
Published
summary
新服务
tags
service
type
Post
URL
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Ff0a12503-6477-4231-96fd-e18ee3493a9d%2FUntitled.jpeg?table=block&id=1e15e37b-3073-40dd-abf7-2d5336f9b9a7&cache=v2)
Summary
- ‣
步骤
#自建docker
export DOCKER_PROJ=hnet-hideip
mkdir /data/$DOCKER_PROJ; cd /data/$DOCKER_PROJ
cat > docker-compose.yml <<EOF
version: "3"
services:
$DOCKER_PROJ:
image: stilleshan/hideipnetwork-web
container_name: $DOCKER_PROJ
restart: always
#ports:
# - 56559:56559
networks:
default:
name: npm_nginx_proxy_manager-network
external: true
EOF
docker-compose down; docker-compose up -d; sleep 1s; docker-compose logs -f
# 反代
location / {
proxy_pass http://hnet-hideip:56559;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
}