Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Config #131

Merged
merged 2 commits into from
Dec 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
read custom config patch
  • Loading branch information
aleskxyz authored Dec 2, 2023
commit 4b2081f33ccc6ce27a747c7738574defe03e0446
10 changes: 10 additions & 0 deletions reality-ezpz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@ function generate_engine_config {
local tls_object=""
local warp_object=""
local reality_port=443
local temp_file
if [[ ${config[transport]} == 'tuic' ]]; then
type='tuic'
elif [[ ${config[transport]} == 'hysteria2' ]]; then
Expand Down Expand Up @@ -1223,6 +1224,15 @@ EOF
}
EOF
fi
if [[ -r ${config_path}/${config[core]}.patch ]]; then
if ! jq empty ${config_path}/${config[core]}.patch; then
echo "${config[core]}.patch is not a valid json file. Fix it or remove it!"
exit 1
fi
temp_file=$(mktemp)
jq -s add ${path[engine]} ${config_path}/${config[core]}.patch > ${temp_file}
mv ${temp_file} ${path[engine]}
fi
}

function generate_config {
Expand Down