diff --git a/app/Http/Controllers/Client/ClientController.php b/app/Http/Controllers/Client/ClientController.php index 93c594a5..07348b53 100755 --- a/app/Http/Controllers/Client/ClientController.php +++ b/app/Http/Controllers/Client/ClientController.php @@ -104,6 +104,7 @@ class ClientController extends Controller $array['cipher'] = 'auto'; if ($item->tls) { $array['tls'] = true; + $array['skip-cert-verify'] = true; } if ($item->network == 'ws') { $array['network'] = $item->network; diff --git a/app/Http/Controllers/Passport/CommController.php b/app/Http/Controllers/Passport/CommController.php index af6c2df7..bae6e8da 100644 --- a/app/Http/Controllers/Passport/CommController.php +++ b/app/Http/Controllers/Passport/CommController.php @@ -40,7 +40,7 @@ class CommController extends Controller $email = $request->input('email'); $cacheKey = 'sendEmailVerify:' . $email; if (Cache::get($cacheKey)) { - abort(500, '验证码已发送,请过一会在请求'); + abort(500, '验证码已发送,请过一会再请求'); } $code = Helper::randomChar(6); $subject = config('v2board.app_name', 'V2Board') . '邮箱验证码'; diff --git a/app/Http/Controllers/Server/DeepbworkController.php b/app/Http/Controllers/Server/DeepbworkController.php index 75317ab3..ad1b6c94 100644 --- a/app/Http/Controllers/Server/DeepbworkController.php +++ b/app/Http/Controllers/Server/DeepbworkController.php @@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Cache; class DeepbworkController extends Controller { - CONST SERVER_CONFIG = '{"api":{"services":["HandlerService","StatsService"],"tag":"api"},"stats":{},"inbound":{"port":443,"protocol":"vmess","settings":{"clients":[]},"streamSettings":{"network":"tcp"},"tag":"proxy"},"inboundDetour":[{"listen":"0.0.0.0","port":23333,"protocol":"dokodemo-door","settings":{"address":"0.0.0.0"},"tag":"api"}],"log":{"loglevel":"debug","access":"access.log","error":"error.log"},"outbound":{"protocol":"freedom","settings":{}},"outboundDetour":[{"protocol":"blackhole","settings":{},"tag":"block"}],"routing":{"settings":{"rules":[{"inboundTag":["api"],"outboundTag":"api","type":"field"}]},"strategy":"rules"},"policy":{"levels":{"0":{"handshake":4,"connIdle":300,"uplinkOnly":5,"downlinkOnly":30,"statsUserUplink":true,"statsUserDownlink":true}}}}'; + CONST SERVER_CONFIG = '{"api":{"services":["HandlerService","StatsService"],"tag":"api"},"stats":{},"inbound":{"port":443,"protocol":"vmess","settings":{"clients":[]},"sniffing":{"enabled": true,"destOverride": ["http","tls"]},"streamSettings":{"network":"tcp"},"tag":"proxy"},"inboundDetour":[{"listen":"0.0.0.0","port":23333,"protocol":"dokodemo-door","settings":{"address":"0.0.0.0"},"tag":"api"}],"log":{"loglevel":"debug","access":"access.log","error":"error.log"},"outbound":{"protocol":"freedom","settings":{}},"outboundDetour":[{"protocol":"blackhole","settings":{},"tag":"block"}],"routing":{"rules":[{"inboundTag":"api","outboundTag":"api","type":"field"}]},"policy":{"levels":{"0":{"handshake":4,"connIdle":300,"uplinkOnly":5,"downlinkOnly":30,"statsUserUplink":true,"statsUserDownlink":true}}}}'; public function __construct(Request $request) { @@ -151,7 +151,7 @@ class DeepbworkController extends Controller $domainObj->type = 'field'; $domainObj->domain = $rules->domain; $domainObj->outboundTag = 'block'; - array_push($json->routing->settings->rules, $domainObj); + array_push($json->routing->rules, $domainObj); } // protocol if (isset($rules->protocol)) { @@ -159,7 +159,7 @@ class DeepbworkController extends Controller $protocolObj->type = 'field'; $protocolObj->protocol = $rules->protocol; $protocolObj->outboundTag = 'block'; - array_push($json->routing->settings->rules, $protocolObj); + array_push($json->routing->rules, $protocolObj); } } diff --git a/app/Http/Controllers/Server/PoseidonController.php b/app/Http/Controllers/Server/PoseidonController.php index b6cf8219..efb3d77d 100644 --- a/app/Http/Controllers/Server/PoseidonController.php +++ b/app/Http/Controllers/Server/PoseidonController.php @@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Cache; class PoseidonController extends Controller { - CONST SERVER_CONFIG = '{"api":{"services":["HandlerService","StatsService"],"tag":"api"},"stats":{},"inbound":{"port":443,"protocol":"vmess","settings":{"clients":[]},"streamSettings":{"network":"tcp"},"tag":"proxy"},"inboundDetour":[{"listen":"0.0.0.0","port":23333,"protocol":"dokodemo-door","settings":{"address":"0.0.0.0"},"tag":"api"}],"log":{"loglevel":"debug","access":"access.log","error":"error.log"},"outbound":{"protocol":"freedom","settings":{}},"outboundDetour":[{"protocol":"blackhole","settings":{},"tag":"block"}],"routing":{"settings":{"rules":[{"inboundTag":["api"],"outboundTag":"api","type":"field"}]},"strategy":"rules"},"policy":{"levels":{"0":{"handshake":4,"connIdle":300,"uplinkOnly":5,"downlinkOnly":30,"statsUserUplink":true,"statsUserDownlink":true}}}}'; + CONST SERVER_CONFIG = '{"api":{"services":["HandlerService","StatsService"],"tag":"api"},"stats":{},"inbound":{"port":443,"protocol":"vmess","settings":{"clients":[]},"sniffing":{"enabled": true,"destOverride": ["http","tls"]},"streamSettings":{"network":"tcp"},"tag":"proxy"},"inboundDetour":[{"listen":"0.0.0.0","port":23333,"protocol":"dokodemo-door","settings":{"address":"0.0.0.0"},"tag":"api"}],"log":{"loglevel":"debug","access":"access.log","error":"error.log"},"outbound":{"protocol":"freedom","settings":{}},"outboundDetour":[{"protocol":"blackhole","settings":{},"tag":"block"}],"routing":{"rules":[{"inboundTag":"api","outboundTag":"api","type":"field"}]},"policy":{"levels":{"0":{"handshake":4,"connIdle":300,"uplinkOnly":5,"downlinkOnly":30,"statsUserUplink":true,"statsUserDownlink":true}}}}'; // 后端获取用户 public function user(Request $request) @@ -142,7 +142,7 @@ class PoseidonController extends Controller $domainObj->type = 'field'; $domainObj->domain = $rules->domain; $domainObj->outboundTag = 'block'; - array_push($json->routing->settings->rules, $domainObj); + array_push($json->routing->rules, $domainObj); } // protocol if (isset($rules->protocol)) { @@ -150,7 +150,7 @@ class PoseidonController extends Controller $protocolObj->type = 'field'; $protocolObj->protocol = $rules->protocol; $protocolObj->outboundTag = 'block'; - array_push($json->routing->settings->rules, $protocolObj); + array_push($json->routing->rules, $protocolObj); } } diff --git a/database/install.sql b/database/install.sql index f232a4d2..c9c5a3c9 100644 --- a/database/install.sql +++ b/database/install.sql @@ -199,7 +199,7 @@ CREATE TABLE `v2_tutorial` ( INSERT INTO `v2_tutorial` (`id`, `title`, `description`, `icon`, `steps`, `show`, `created_at`, `updated_at`) VALUES (1, 'Windows', '兼容 Windows 7 以上的版本', 'fab fa-2x fa-windows', '[{\"default_area\":\"
下载 V2rayN 客户端。
下载完成后解压,解压完成后运行V2rayN
运行时请右键,以管理员身份运行
\",\"download_url\":\"/downloads/V2rayN.zip\"},{\"default_area\":\"
点击订阅按钮,选择订阅设置点击添加,输入如下内容后点击确定保存
\",\"safe_area\":\"
备注:{{$app_name}}
\\n
地址(url):{{$subscribe_url}}
\",\"img_url\":\"https://i.loli.net/2019/11/21/UkcHNtERTnjLVS8.jpg\"},{\"default_area\":\"
点击订阅后,从服务器列表选择服务器
\",\"img_url\":\"https://i.loli.net/2019/11/21/BgPGFQ3kCSuIRjJ.jpg\"},{\"default_area\":\"
点击参数设置,找到Http代理,选择PAC模式后按确定保存即启动代理。
\",\"img_url\":\"https://i.loli.net/2019/11/21/vnVykKEFT8Lzo3f.jpg\"}]', 1, 1577972408, 1577984396), (2, 'Android', '兼容 Android 6 以上的版本', 'fab fa-2x fa-android', '[{\"default_area\":\"
下载 V2rayNG 客户端。
\",\"safe_area\":\"\",\"download_url\":\"/downloads/V2rayNG.apk\"},{\"default_area\":\"
打开 V2rayNG 点击左上角的菜单图标打开侧边栏,随后点击 订阅设置,点击右上角的➕按钮新增订阅。
按照下方内容进行填写,填写完毕后点击右上角的☑️按钮。
\",\"safe_area\":\"
备注:{{$app_name}}
\\n
地址(url):{{$subscribe_url}}
\",\"download_url\":\"\",\"img_url\":\"https://i.loli.net/2019/11/21/ghuVkTe6LBqRxSO.jpg\"},{\"default_area\":\"
再次从侧边栏进入 设置 页面,点击 路由模式 将其更改为 \\b绕过局域网及大陆地址。
\",\"img_url\":\"https://i.loli.net/2019/11/21/Tf1AGoXZuhJrwOq.jpg\"},{\"default_area\":\"
随后从侧边栏回到 配置文件 页面,点击右上角的省略号图标选择更新订阅。
\",\"img_url\":\"https://i.loli.net/2019/11/21/UtfPShQXupRmB4L.jpg\"},{\"img_url\":\"https://i.loli.net/2019/11/21/ZkbNsSrAg3m5Dny.jpg\",\"default_area\":\"
点击选择您需要的节点,点击右下角的V字按钮即可连接。
\"}]', 1, 1577972534, 1577984397), -(3, 'macOS', '兼容 Yosemite 以上的版本', 'fab fa-2x fa-apple', '[{\"default_area\":\"
下载 ClashX 客户端,安装后运行。
\",\"download_url\":\"/downloads/ClashX.dmg\",\"img_url\":\"https://i.loli.net/2019/11/20/uNGrjl2noCL1f5B.jpg\"},{\"default_area\":\"
点击通知栏 ClashX 图标保持选中状态,按快捷键 ⌘+M(订阅快捷键),在弹出的窗口点击添加输入下方信息
\",\"safe_area\":\"
Url:{{$app_name}}
\\n
Config Name:{{$subscribe_url}}
\",\"img_url\":\"https://i.loli.net/2019/11/20/8eB13mRbFuszwxg.jpg\"},{\"default_area\":\"
点击通知栏 ClashX 图标保持选中状态,按快捷键 ⌘+S(设置为系统代理快捷键),即连接完成
\"}]', 1, 1577979855, 1577984397), +(3, 'macOS', '兼容 Yosemite 以上的版本', 'fab fa-2x fa-apple', '[{\"default_area\":\"
下载 ClashX 客户端,安装后运行。
\",\"download_url\":\"/downloads/ClashX.dmg\",\"img_url\":\"https://i.loli.net/2019/11/20/uNGrjl2noCL1f5B.jpg\"},{\"default_area\":\"
点击通知栏 ClashX 图标保持选中状态,按快捷键 ⌘+M(订阅快捷键),在弹出的窗口点击添加输入下方信息
\",\"safe_area\":\"
Url:{{$subscribe_url}}
\\n
Config Name:{{$app_name}}
\",\"img_url\":\"https://i.loli.net/2019/11/20/8eB13mRbFuszwxg.jpg\"},{\"default_area\":\"
点击通知栏 ClashX 图标保持选中状态,按快捷键 ⌘+S(设置为系统代理快捷键),即连接完成
\"}]', 1, 1577979855, 1577984397), (4, 'iOS', '兼容 iOS 9 以上的版本', 'fab fa-2x fa-apple', '[{\"default_area\":\"
iOS上使用请在iOS浏览器中打开本页
\"},{\"default_area\":\"
在 App Store 登录本站提供的美区 Apple ID 下载客户端。
为了保护您的隐私,请勿在手机设置里直接登录,仅在 App Store 登录即可。
登陆完成后点击下方下载会自动唤起下载。
\",\"safe_area\":\"
Apple ID:{{$apple_id}}
密码:点击复制密码
\",\"download_url\":\"https://apps.apple.com/us/app/shadowrocket/id932747118\",\"img_url\":\"https://i.loli.net/2019/11/21/5idkjJ61stWgREV.jpg\"},{\"default_area\":\"
待客户端安装完成后,点击下方一键订阅按钮会自动唤起并进行订阅
\",\"safe_area\":\"\",\"img_url\":\"https://i.loli.net/2019/11/21/ZcqlNMb3eg5Uhxd.jpg\",\"download_url\":\"shadowrocket://add/sub://{{$b64_subscribe_url}}?remark={{$app_name}}\"},{\"default_area\":\"
选择节点进行链接,首次链接过程授权窗口请一路允许。
\",\"img_url\":\"https://i.loli.net/2019/11/21/9Zdxksr7Ey6hjlm.jpg\"}]', 1, 1577982016, 1577983283); DROP TABLE IF EXISTS `v2_user`; @@ -238,4 +238,4 @@ CREATE TABLE `v2_user` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- 2020-02-14 10:22:53 +-- 2020-02-17 22:12:21 diff --git a/database/update.sql b/database/update.sql index 4fed4d7d..a2cb7ad5 100644 --- a/database/update.sql +++ b/database/update.sql @@ -123,7 +123,7 @@ SET NAMES utf8mb4; INSERT INTO `v2_tutorial` (`id`, `title`, `description`, `icon`, `steps`, `show`, `created_at`, `updated_at`) VALUES (1, 'Windows', '兼容 Windows 7 以上的版本', 'fab fa-2x fa-windows', '[{\"default_area\":\"
下载 V2rayN 客户端。
下载完成后解压,解压完成后运行V2rayN
运行时请右键,以管理员身份运行
\",\"download_url\":\"/downloads/V2rayN.zip\"},{\"default_area\":\"
点击订阅按钮,选择订阅设置点击添加,输入如下内容后点击确定保存
\",\"safe_area\":\"
备注:{{$app_name}}
\\n
地址(url):{{$subscribe_url}}
\",\"img_url\":\"https://i.loli.net/2019/11/21/UkcHNtERTnjLVS8.jpg\"},{\"default_area\":\"
点击订阅后,从服务器列表选择服务器
\",\"img_url\":\"https://i.loli.net/2019/11/21/BgPGFQ3kCSuIRjJ.jpg\"},{\"default_area\":\"
点击参数设置,找到Http代理,选择PAC模式后按确定保存即启动代理。
\",\"img_url\":\"https://i.loli.net/2019/11/21/vnVykKEFT8Lzo3f.jpg\"}]', 1, 1577972408, 1577980882), (2, 'Android', '兼容 Android 6 以上的版本', 'fab fa-2x fa-android', '[{\"default_area\":\"
下载 V2rayNG 客户端。
\",\"safe_area\":\"\",\"download_url\":\"/downloads/V2rayNG.apk\"},{\"default_area\":\"
打开 V2rayNG 点击左上角的菜单图标打开侧边栏,随后点击 订阅设置,点击右上角的➕按钮新增订阅。
按照下方内容进行填写,填写完毕后点击右上角的☑️按钮。
\",\"safe_area\":\"
备注:{{$app_name}}
\\n
地址(url):{{$subscribe_url}}
\",\"download_url\":\"\",\"img_url\":\"https://i.loli.net/2019/11/21/ghuVkTe6LBqRxSO.jpg\"},{\"default_area\":\"
再次从侧边栏进入 设置 页面,点击 路由模式 将其更改为 \\b绕过局域网及大陆地址。
\",\"img_url\":\"https://i.loli.net/2019/11/21/Tf1AGoXZuhJrwOq.jpg\"},{\"default_area\":\"
随后从侧边栏回到 配置文件 页面,点击右上角的省略号图标选择更新订阅。
\",\"img_url\":\"https://i.loli.net/2019/11/21/UtfPShQXupRmB4L.jpg\"},{\"img_url\":\"https://i.loli.net/2019/11/21/ZkbNsSrAg3m5Dny.jpg\",\"default_area\":\"
点击选择您需要的节点,点击右下角的V字按钮即可连接。
\"}]', 1, 1577972534, 1577981610), -(3, 'macOS', '兼容 Yosemite 以上的版本', 'fab fa-2x fa-apple', '[{\"default_area\":\"
下载 ClashX 客户端,安装后运行。
\",\"download_url\":\"/downloads/ClashX.dmg\",\"img_url\":\"https://i.loli.net/2019/11/20/uNGrjl2noCL1f5B.jpg\"},{\"default_area\":\"
点击通知栏 ClashX 图标保持选中状态,按快捷键 ⌘+M(订阅快捷键),在弹出的窗口点击添加输入下方信息
\",\"safe_area\":\"
Url:{{$app_name}}
\\n
Config Name:{{$subscribe_url}}
\",\"img_url\":\"https://i.loli.net/2019/11/20/8eB13mRbFuszwxg.jpg\"},{\"default_area\":\"
点击通知栏 ClashX 图标保持选中状态,按快捷键 ⌘+S(设置为系统代理快捷键),即连接完成
\"}]', 1, 1577979855, 1577981646), +(3, 'macOS', '兼容 Yosemite 以上的版本', 'fab fa-2x fa-apple', '[{\"default_area\":\"
下载 ClashX 客户端,安装后运行。
\",\"download_url\":\"/downloads/ClashX.dmg\",\"img_url\":\"https://i.loli.net/2019/11/20/uNGrjl2noCL1f5B.jpg\"},{\"default_area\":\"
点击通知栏 ClashX 图标保持选中状态,按快捷键 ⌘+M(订阅快捷键),在弹出的窗口点击添加输入下方信息
\",\"safe_area\":\"
Url:{{$subscribe_url}}
\\n
Config Name:{{$app_name}}
\",\"img_url\":\"https://i.loli.net/2019/11/20/8eB13mRbFuszwxg.jpg\"},{\"default_area\":\"
点击通知栏 ClashX 图标保持选中状态,按快捷键 ⌘+S(设置为系统代理快捷键),即连接完成
\"}]', 1, 1577979855, 1577981646), (4, 'iOS', '兼容 iOS 9 以上的版本', 'fab fa-2x fa-apple', '[{\"default_area\":\"
iOS上使用请在iOS浏览器中打开本页
\"},{\"default_area\":\"
在 App Store 登录本站提供的美区 Apple ID 下载客户端。
为了保护您的隐私,请勿在手机设置里直接登录,仅在 App Store 登录即可。
登陆完成后点击下方下载会自动唤起下载。
\",\"safe_area\":\"
Apple ID:{{$apple_id}}
密码:点击复制密码
\",\"download_url\":\"https://apps.apple.com/us/app/shadowrocket/id932747118\",\"img_url\":\"https://i.loli.net/2019/11/21/5idkjJ61stWgREV.jpg\"},{\"default_area\":\"
待客户端安装完成后,点击下方一键订阅按钮会自动唤起并进行订阅
\",\"safe_area\":\"\",\"img_url\":\"https://i.loli.net/2019/11/21/ZcqlNMb3eg5Uhxd.jpg\",\"download_url\":\"shadowrocket://add/sub://{{$b64_subscribe_url}}?remark={{$app_name}}\"},{\"default_area\":\"
选择节点进行链接,首次链接过程授权窗口请一路允许。
\",\"img_url\":\"https://i.loli.net/2019/11/21/9Zdxksr7Ey6hjlm.jpg\"}]', 1, 1577982016, 1577983283); ALTER TABLE `v2_server_log`