refactor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
quackerd 2023-08-21 09:22:57 -04:00
parent 050cecc84f
commit fdb1acdaef
3 changed files with 5 additions and 19 deletions

5
.env
View File

@ -1,5 +0,0 @@
PORT=443
TARGET_URL=example.com
TARGET_PORT=443
USERS=exampleuser1,exampleuser2
LOG_LEVEL=warn

View File

@ -7,12 +7,12 @@ services:
image: quackerd/d2ray
container_name: d2ray
ports:
- ${PORT}:${PORT}
- 8443:8443
environment:
- PORT=${PORT}
- TARGET_URL=${TARGET_URL}
- TARGET_PORT=${TARGET_PORT}
- USERS=${USERS}
- PORT=8443
- TARGET_URL=example.com
- TARGET_PORT=443
- USERS=exampleuser1,exampleuser2
- LOG_LEVEL=${LOG_LEVEL}
restart: unless-stopped
networks:

View File

@ -1,5 +1,4 @@
import os
import sys
import subprocess
import jinja2
import random
@ -55,14 +54,6 @@ class d2args:
)
return ret
def get_users_json(self) -> str:
ret : str= ""
for i in range(len(users)):
if (i > 0):
ret = ret + ","
ret = ret + "{\"id\": \"" + users[i][0] + "\",\"flow\": \"" + users[i][1] + "\"}"
return ret
def process_directory(path : str, vars : dict[str, str], delete_template : bool = True) -> None:
for f in os.listdir(path):