From b0732d2f3c37ffeab3ba9edffe41a036348ac573 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 22 Oct 2022 16:03:05 +0800 Subject: [PATCH] v2raya: add options to support hook scripts See https://v2raya.org/docs/manual/hook/ for details. Signed-off-by: Tianling Shen --- v2raya/files/v2raya.config | 13 +++++++++++++ v2raya/files/v2raya.init | 3 +++ 2 files changed, 16 insertions(+) diff --git a/v2raya/files/v2raya.config b/v2raya/files/v2raya.config index fbda474..d9ff365 100644 --- a/v2raya/files/v2raya.config +++ b/v2raya/files/v2raya.config @@ -31,6 +31,19 @@ config v2raya 'config' # Additional v2ray config directory, files in it will be combined with config generated by v2rayA option v2ray_confdir '' + # The executable file to run in the transparent proxy life-cycle. + # v2rayA will pass in the --transparent-type (tproxy, redirect) + # and --stage (pre-start, post-start, pre-stop, post-stop) arguments. + option transparent_hook '' + + # The executable file to run in the v2ray-core life-cycle. + # v2rayA will pass in the --stage (pre-start, post-start, pre-stop, post-stop) argument. + option core_hook '' + + # The executable file to run in the v2ray-core life-cycle. + # v2rayA will pass in the --stage (pre-start, post-start, pre-stop, post-stop) argument. + option plugin_manager '' + # Specify the certification path instead of automatically generating a self-signed certificate. # Example: /etc/v2raya/grpc_certificate.crt,/etc/v2raya/grpc_private.key option vless_grpc_inbound_cert_key '' diff --git a/v2raya/files/v2raya.init b/v2raya/files/v2raya.init index 9c207f7..4120e90 100755 --- a/v2raya/files/v2raya.init +++ b/v2raya/files/v2raya.init @@ -48,6 +48,9 @@ start_service() { append_env_arg "config" "log_max_days" "3" append_env_arg "config" "v2ray_bin" append_env_arg "config" "v2ray_confdir" + append_env_arg "config" "transparent_hook" + append_env_arg "config" "core_hook" + append_env_arg "config" "plugin_manager" append_env_arg "config" "vless_grpc_inbound_cert_key" append_env_bool "config" "log_disable_color" append_env_bool "config" "log_disable_timestamp" -- 2.11.0