Skip to content

Commit

Permalink
fix URL
Browse files Browse the repository at this point in the history
  • Loading branch information
233boy committed May 17, 2023
1 parent 226ffb6 commit 5f59bdf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@
- 一键更改 (端口/UUID/密码/域名/路径/加密方式/SNI/动态端口/等...)
- 还有更多...

# 设计理念

设计理念为:**高效率,超快速,极易用**

脚本基于作者的自身使用需求,以 **多配置同时运行** 为核心设计

并且专门优化了,添加、更改、查看、删除、这四项常用功能

你只需要一条命令即可完成 添加、更改、查看、删除、等操作

例如,添加一个配置仅需不到 1 秒!瞬间完成添加!其他操作亦是如此!

脚本的参数非常高效率并且超级易用,请掌握参数的使用

# 文档

安装及使用:https://233boy.com/xray/xray-script/
Expand Down
9 changes: 5 additions & 4 deletions src/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ info() {
is_can_change=(0 1 5 7)
is_info_show=(0 1 2 3 4 5)
is_vmess_url=$(jq -c '{v:2,ps:'\"233boy-${net}-$is_addr\"',add:'\"$is_addr\"',port:'\"$port\"',id:'\"$uuid\"',net:'\"$net\"',type:'\"$header_type\"',path:'\"$kcp_seed\"'}' <<<{})
is_url=vmess:https://$(base64 -w 0 <<<$is_vmess_url)
is_url=vmess:https://$(echo -n $is_vmess_url | base64 -w 0)
is_tmp_port=$port
[[ $is_dynamic_port ]] && {
is_can_change+=(12)
Expand All @@ -1445,7 +1445,7 @@ info() {
ss)
is_can_change=(0 1 4 6)
is_info_show=(0 1 2 10 11)
is_url="ss:https://$(base64 -w 0 <<<"${ss_method}:${ss_password}")@${is_addr}:${port}#233boy-ss-${is_addr}"
is_url="ss:https://$(echo -n ${ss_method}:${ss_password} | base64 -w 0)@${is_addr}:${port}#233boy-ss-${is_addr}"
is_info_str=($is_protocol $is_addr $port $ss_password $ss_method)
;;
ws | h2 | grpc)
Expand All @@ -1459,7 +1459,7 @@ info() {
}
[[ $is_protocol == 'vmess' ]] && {
is_vmess_url=$(jq -c '{v:2,ps:'\"233boy-$host\"',add:'\"$is_addr\"',port:'\"443\"',id:'\"$uuid\"',net:'\"$net\"',host:'\"$host\"',path:'\"$path\"',tls:'\"tls\"'}' <<<{})
is_url=vmess:https://$(base64 -w 0 <<<$is_vmess_url)
is_url=vmess:https://$(echo -n $is_vmess_url | base64 -w 0)
} || {
[[ $is_trojan ]] && {
uuid=$trojan_password
Expand Down Expand Up @@ -1488,7 +1488,7 @@ info() {
is_can_change=(0 1 15 4)
is_info_show=(0 1 2 19 10)
is_info_str=($is_protocol $is_addr $port $is_socks_user $is_socks_pass)
is_url="socks:https://$(base64 -w 0 <<<"${is_socks_user}:${is_socks_pass}")@${is_addr}:${port}#233boy-socks-${is_addr}"
is_url="socks:https://$(echo -n ${is_socks_user}:${is_socks_pass} | base64 -w 0)@${is_addr}:${port}#233boy-socks-${is_addr}"
;;
http)
is_can_change=(0 1)
Expand Down Expand Up @@ -1605,6 +1605,7 @@ update() {
fi
download $is_update_name $is_new_ver
msg "更新成功, 当前 $is_show_name 版本: $(_green $is_new_ver)\n"
msg "$(_green 请查看更新说明: https://github.com/$is_sh_repo/releases/tag/$is_new_ver)\n"
manage restart $is_update_name &
}

Expand Down
2 changes: 1 addition & 1 deletion xray.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

args=$@
is_sh_ver=v1.02
is_sh_ver=v1.03

. /etc/xray/sh/src/init.sh

0 comments on commit 5f59bdf

Please sign in to comment.