Skip to content
This repository was archived by the owner on May 8, 2024. It is now read-only.

Commit 64e9d9f

Browse files
authoredJun 2, 2021
Add files via upload
1 parent 4791d91 commit 64e9d9f

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed
 

‎Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM teddysun/xray
2+
RUN apk add --no-cache alpine-conf
3+
ADD entrypoint.sh /
4+
RUN chmod +x /entrypoint.sh
5+
CMD /entrypoint.sh

‎app.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "xray-heroku",
3+
"description": "deploy xray to heroku",
4+
"keywords": ["xray"],
5+
"env": {
6+
"UUID": {
7+
"description": "xray UUID",
8+
"value": "36cfc3de-ecfd-4752-ae6f-8f0f92035143"
9+
}
10+
},
11+
"repository": "https://github.com/iamtrazy/xray-heroku",
12+
"stack": "container"
13+
}

‎entrypoint.sh

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/sh
2+
#config timezone
3+
4+
setup-timezone -z Asia/Colombo
5+
apk del alpine-conf
6+
7+
#enable bbr
8+
echo net.core.default_qdisc=fq >> /etc/sysctl.conf
9+
echo net.ipv4.tcp_congestion_control=bbr >> /etc/sysctl.conf
10+
sysctl -p
11+
12+
#Config xray
13+
rm -rf /etc/xray/config.json
14+
cat << EOF > /etc/xray/config.json
15+
{
16+
"inbounds":[
17+
{
18+
"port": $PORT,
19+
"protocol": "vless",
20+
"settings": {
21+
"decryption": "none",
22+
"clients": [
23+
{
24+
"id": "$UUID"
25+
}
26+
]
27+
},
28+
"streamSettings": {
29+
"network": "ws"
30+
}
31+
}
32+
],
33+
"outbounds": [
34+
{
35+
"protocol": "freedom"
36+
}
37+
]
38+
}
39+
EOF
40+
41+
#run xray
42+
43+
xray -c /etc/xray/config.json

‎heroku.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build:
2+
docker:
3+
web: Dockerfile

0 commit comments

Comments
 (0)
This repository has been archived.