haojianyun

welcom to my haojianyun.com

v2ray 是一种代理神器,可以看他的 https://github.com/v2ray

1. docker-compose.yaml

version: "3"
services:
v2ray:
image: v2ray/official
container_name: v2ray
restart: always
command: v2ray -config=/etc/v2ray/config.json
ports:
- "8888:8888"
#- "127.0.0.1:8889:8889"
volumes:
- ./v2ray:/etc/v2ray
#- /etc/v2ray/v2ray.crt:/etc/v2ray/v2ray.crt
#- /etc/v2ray/v2ray.key:/etc/v2ray/v2ray.key

2. config.json ,中 id 换成自己的

可以在这个网站生成: https://intmainreturn0.com/v2ray-config-gen/

{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 8888,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "3acae2d6-3612-fdba-2c53-d6fe3344562",
"level": 1,
"alterId": 100
}
]
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"inboundDetour": [],
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}

1月 21st, 2021

Posted In: Uncategorized

Leave a Comment

ossfs centos 8.x 安装报错 error

error while loading shared libraries: libcrypto.so.10: cannot open shared object file: No such file or directory

或者 or

ossfs: /lib64/libcrypto.so.10: version `libcrypto.so.10' not found (required by ossfs)

解决办法,安装老的 ssl 10 或者对应的数字

yum install compat-openssl10

ok

1月 20th, 2021

Posted In: PHP开发笔记

Leave a Comment

yaml 文件


version: '3'
networks:
nginxphp:

services:
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./data/conf:/etc/nginx/conf.d
- ./data/var/www:/var/www
ports:
- "80:80"
- "443:443"
depends_on:
- php-fpm
networks:
- nginxphp

php-fpm:
image: crunchgeek/php-fpm:7.3
container_name: php-fpm
volumes:
- ./data/var/www:/var/www
ports:
- "127.0.0.1:9000:9000"
networks:
- nginxphp

####

1月 19th, 2021

Posted In: Uncategorized

Leave a Comment

version: ‘3’
services:
mysql:
container_name: mysql5.5
image: mysql:5.5.44
ports:
– “3306:3306”
environment:
MYSQL_ROOT_PASSWORD: “123456”
MYSQL_USER: ‘csroot’
MYSQL_PASS: ‘cs123456’
restart: always
volumes:
– “./db:/var/lib/mysql”
– “./conf/my.cnf:/etc/my.cnf”
– “./init:/docker-entrypoint-initdb.d/”
deploy:
resources:
limits:
cpus: ‘0.2’
memory: 100M
#reservations:
#cpus: ‘0.2’
#memory: 200M

1月 19th, 2021

Posted In: Uncategorized

Leave a Comment