[新服务] 自建alpine docker + hideipnetwork hnet

date
Jun 7, 2023
slug
newservice-alpine-hideip-hnet
status
Published
summary
新服务
tags
service
type
Post
URL
notion image

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;
    }

#set up npm reverse proxy

验证

 

© Ying Bun 2021 - 2024