diff --git a/customize.sh b/customize.sh index 045a81e..323ed2f 100644 --- a/customize.sh +++ b/customize.sh @@ -10,22 +10,22 @@ mkdir -p /data/v2ray mkdir -p /data/v2ray/run mkdir -p $MODPATH/scripts mkdir -p $MODPATH/system/bin -mkdir -p $MODPATH/system/app -mkdir -p $MODPATH/system/app/Stk +# mkdir -p $MODPATH/system/app +# mkdir -p $MODPATH/system/app/Stk mkdir -p $MODPATH/system/etc ui_print "- Install V2Ray core execute files" unzip -j -o "${ZIPFILE}" "v2ray/bin/v2ray" -d $MODPATH/system/bin >&2 unzip -j -o "${ZIPFILE}" "v2ray/bin/geoip.dat" -d /data/v2ray >&2 unzip -j -o "${ZIPFILE}" "v2ray/bin/geosite.dat" -d /data/v2ray >&2 -unzip -j -o "${ZIPFILE}" "v2ray/bin/v2manager.apk" -d $MODPATH/system/app/Stk >&2 +# unzip -j -o "${ZIPFILE}" "v2ray/bin/v2manager.apk" -d $MODPATH/system/app/Stk >&2 unzip -j -o "${ZIPFILE}" 'v2ray/scripts/*' -d $MODPATH/scripts >&2 unzip -j -o "${ZIPFILE}" 'service.sh' -d $MODPATH >&2 unzip -j -o "${ZIPFILE}" 'uninstall.sh' -d $MODPATH >&2 # pm command was not working in install scipt? -ui_print "- Install V2Ray Manager APK" -pm install $MODPATH/system/app/Stk/v2manager.apk +# ui_print "- Install V2Ray Manager APK" +# pm install $MODPATH/system/app/Stk/v2manager.apk rm "${download_v2ray_zip}" # copy v2ray data and config @@ -59,4 +59,4 @@ set_perm $MODPATH/scripts/start.sh 0 0 0755 set_perm $MODPATH/scripts/v2ray.service 0 0 0755 set_perm $MODPATH/scripts/v2ray.tproxy 0 0 0755 set_perm $MODPATH/system/bin/v2ray ${inet_uid} ${inet_uid} 0755 -set_perm /data/v2ray ${inet_uid} ${inet_uid} 0755 \ No newline at end of file +set_perm /data/v2ray ${inet_uid} ${inet_uid} 0755 diff --git a/module.prop b/module.prop index 710d8c6..e4d6915 100644 --- a/module.prop +++ b/module.prop @@ -1,6 +1,6 @@ id=v2ray name=V2ray for Android -version=2.0.1.02 -versionCode=20220223 +version=2.1.0.0 +versionCode=20230529 author=ohnoku description=V2ray core with service scripts for Android diff --git a/v2ray/scripts/v2ray.service b/v2ray/scripts/v2ray.service index 5d2fec7..8ea4756 100644 --- a/v2ray/scripts/v2ray.service +++ b/v2ray/scripts/v2ray.service @@ -7,7 +7,7 @@ run_path="${data_path}/run" pid_file="${run_path}/${bin_name}.pid" error_log="${run_path}/error.log" conf_file="${data_path}/config.json" -bin_opts="-config ${conf_file}" +bin_opts="run -c ${conf_file}" iptables_wait="iptables" @@ -80,9 +80,9 @@ start_service() { elif [ -f ${conf_file} ] && ${bin_path} ${bin_opts} -test ; then echo "[Info]: Starting ${bin_name} service." mkdir -p ${run_path} - chown -R inet:inet ${data_path} - chown inet:inet ${bin_path} - chmod 6755 ${bin_path} + # chown -R inet:inet ${data_path} + # chown inet:inet ${bin_path} + # chmod 6755 ${bin_path} nohup ${bin_path} ${bin_opts} &>${error_log} & echo -n $! > ${pid_file} if wait_v2ray_listen ; then diff --git a/v2ray/scripts/v2ray.tproxy b/v2ray/scripts/v2ray.tproxy index 8fb2b80..035a6fd 100644 --- a/v2ray/scripts/v2ray.tproxy +++ b/v2ray/scripts/v2ray.tproxy @@ -1,12 +1,13 @@ #!/system/bin/sh -route_id="1130" +# route_id="1130" inet_uid="3003" -net_raw_uid="3004" +root_uid="0" +# net_raw_uid="3004" route_name="v2ray" proxy_port="65535" -proxy_mark="0x20151130" -table_file="/data/misc/net/rt_tables" +# proxy_mark="0x20151130" +# table_file="/data/misc/net/rt_tables" appid_file="/data/v2ray/appid.list" softap_file="/data/v2ray/softap.list" iptables_wait="iptables" @@ -152,6 +153,7 @@ proxy_app_tcp_iptables() { ${iptables_wait} -t nat -N APP_TCP_PROXY ## bypass v2ray program ${iptables_wait} -t nat -A APP_TCP_PROXY -m owner --uid-owner ${inet_uid} -j RETURN + ${iptables_wait} -t nat -A APP_TCP_PROXY -m owner --uid-owner ${root_uid} -j RETURN ## white-list mode if [ "${app_proxy_mode}" = "pick" ] ; then ## proxy all apps network