Skip to content

Commit

Permalink
Switch to xray (test)
Browse files Browse the repository at this point in the history
  • Loading branch information
ed-asriyan committed Nov 30, 2024
1 parent bc0435c commit e604d68
Show file tree
Hide file tree
Showing 44 changed files with 364 additions and 995 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CD-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
task:
- deploy_metrics
# - deploy_metrics
- deploy_proxies
with:
tasks: ${{ matrix.task }}
Expand Down
4 changes: 2 additions & 2 deletions config/hosts.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ all:
# linux user to connect to ssh to the server as
ansible_user:
proxy1:
# uuid of the shadowsocks server that should be deployed (from config/servers.yml)
# uuid of the xray server that should be deployed (from config/servers.yml)
hosts_server_uuid:
# public domain or IP where shadowsocks should be deployed (if ssh and shadowsocks are on the same IP, it should be equal to config_servers[hosts_server_uuid].host value)
# public domain or IP where xray should be deployed (if ssh and xray are on the same IP, it should be equal to config_servers[hosts_server_uuid].host value)
ansible_host:
# linux user to connect to ssh to the server as
ansible_user:
Expand Down
62 changes: 19 additions & 43 deletions config/servers.example.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,31 @@
config_servers:
server1-uuid:
flow:
# private key. generate with ./xray x25519
private_key:
# public key. generate with ./xray x25519
public_key:
# where regular https requests proxy to
sni:
# domain of server that will be put into config
host:
# description or name of server
remarks:
# port of shadowsocks to be exposed and used publicly
port:
# cipher to use in shadowsocks
method:
# secret (any random string) to be used for generating client passwords
secret:
# prefix to use. read more: https://www.reddit.com/r/outlinevpn/wiki/index/prefixing
prefix:
# where regular https requests (non-shadowsocks requests) proxy to
fallback_proxy_target:
# if you don't want to install prometheus on the server, replace yaml object to boolean false:
# prometheus_metrics: false
prometheus_metrics:
# port where prometheus metrics endpoints should be exposed
port:
# content of self-signed cert and keys (SSL pem format)
tls:
certificate: |
-----BEGIN CERTIFICATE-----
....
-----END CERTIFICATE-----
key: |
-----BEGIN PRIVATE KEY-----
....
-----END PRIVATE KEY-----
shadowsocks:
# any random URL-valid string starting with "/"
url_path:
node_exporter:
# any random URL-valid string starting with "/"
url_path:

# second server (for instance)
server2-uuid:
flow:
# private key. generate with ./xray x25519
private_key:
# public key. generate with ./xray x25519
public_key:
# where regular https requests proxy to
sni:
# domain of server that will be put into config
host:
# description or name of server
remarks:
port:
method:
secret:
prefix:
fallback_proxy_target:
prometheus_metrics:
port:
tls:
certificate_path:
key_path:
shadowsocks:
url_path:
node_exporter:
url_path:
# port of shadowsocks to be exposed and used publicly
port:
8 changes: 4 additions & 4 deletions proxies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
- ./config/users.yml
- ./config/servers.yml
roles:
- role: shadowsocks-gateway
- role: xray
vars:
shadowsocks_gateway_server_uuid: "{{ hosts_server_uuid }}"
shadowsocks_gateway_server: "{{ config_servers[shadowsocks_gateway_server_uuid] }}"
shadowsocks_gateway_users: "{{ config_users }}"
xray_server_uuid: "{{ hosts_server_uuid }}"
xray_server: "{{ config_servers[xray_server_uuid] }}"
xray_users: "{{ config_users }}"
12 changes: 0 additions & 12 deletions roles/nginx/README.md

This file was deleted.

43 changes: 0 additions & 43 deletions roles/nginx/tasks/main.yml

This file was deleted.

5 changes: 0 additions & 5 deletions roles/node-exporter/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions roles/node-exporter/defaults/main.yml

This file was deleted.

63 changes: 0 additions & 63 deletions roles/node-exporter/tasks/main.yml

This file was deleted.

11 changes: 0 additions & 11 deletions roles/node-exporter/templates/node_exporter.service.j2

This file was deleted.

19 changes: 0 additions & 19 deletions roles/node-exporter/vars/main.yml

This file was deleted.

6 changes: 0 additions & 6 deletions roles/prometheus/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions roles/prometheus/defaults/main.yml

This file was deleted.

Loading

0 comments on commit e604d68

Please sign in to comment.