diff --git a/README.md b/README.md index f83cf7c..b04b3c3 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -详情见:[https://91vps.us/2017/06/09/alipay_f2f_ss_panel_mod/](https://91vps.us/2017/06/09/alipay_f2f_ss_panel_mod/) +详情见:[https://91vps.club/2017/06/09/alipay_f2f_ss_panel_mod/](https://91vps.club/2017/06/09/alipay_f2f_ss_panel_mod/) diff --git a/app/Command/Job.php b/app/Command/Job.php index 2496443..e8d15df 100644 --- a/app/Command/Job.php +++ b/app/Command/Job.php @@ -50,10 +50,10 @@ class Job $db_address_array = explode(':', Config::get('db_host')); - system('mysqldump --user='.Config::get('db_username').' --password='.Config::get('db_password').' --host='.$db_address_array[0].' '.(isset($db_address_array[1])?'-P '.$db_address_array[1]:'').' '.Config::get('db_database').' announcement auto blockip bought code coupon disconnect_ip link login_ip payback radius_ban shop speedtest ss_invite_code ss_node ss_password_reset ticket unblockip user user_token email_verify detect_list relay> /tmp/ssmodbackup/mod.sql', $ret); + system('mysqldump --user='.Config::get('db_username').' --password='.Config::get('db_password').' --host='.$db_address_array[0].' '.(isset($db_address_array[1])?'-P '.$db_address_array[1]:'').' '.Config::get('db_database').' announcement auto blockip bought code coupon disconnect_ip link login_ip payback radius_ban shop speedtest ss_invite_code ss_node ss_password_reset ticket unblockip user user_token email_verify detect_list relay paylist> /tmp/ssmodbackup/mod.sql', $ret); - system('mysqldump --opt --user='.Config::get('db_username').' --password='.Config::get('db_password').' --host='.$db_address_array[0].' '.(isset($db_address_array[1])?'-P '.$db_address_array[1]:'').' -d '.Config::get('db_database').' alive_ip ss_node_info ss_node_online_log user_traffic_log detect_log >> /tmp/ssmodbackup/mod.sql', $ret); + system('mysqldump --opt --user='.Config::get('db_username').' --password='.Config::get('db_password').' --host='.$db_address_array[0].' '.(isset($db_address_array[1])?'-P '.$db_address_array[1]:'').' -d '.Config::get('db_database').' alive_ip ss_node_info ss_node_online_log user_traffic_log detect_log telegram_session >> /tmp/ssmodbackup/mod.sql', $ret); if (Config::get('enable_radius')=='true') { $db_address_array = explode(':', Config::get('radius_db_host')); diff --git a/app/Models/User.php b/app/Models/User.php index 0ae4fd1..3e258aa 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -310,7 +310,7 @@ class User extends Model $location=$iplocation->getlocation($reg_location); $reg_location .= "\n".iconv('gbk', 'utf-8//IGNORE', $location['country'].$location['area']); - $return_array = Array('DT_RowId' => 'row_user_'.$id, $id, $id, + $return_array = Array('DT_RowId' => 'row_1_'.$id, $id, $id, $this->attributes['user_name'], $this->attributes['remark'], $this->attributes['email'], $this->attributes['money'], $im_type, $im_value, diff --git a/app/Utils/Tools.php b/app/Utils/Tools.php index 1bb19cf..6e1fec5 100644 --- a/app/Utils/Tools.php +++ b/app/Utils/Tools.php @@ -141,7 +141,7 @@ class Tools public static function base64_url_encode($input) { - return strtr(base64_encode($input), '+/', '-_'); + return strtr(base64_encode($input), array('+' => '-', '/' => '_', '=' => '')); } public static function base64_url_decode($input) diff --git a/app/Utils/URL.php b/app/Utils/URL.php index c42c313..b557343 100644 --- a/app/Utils/URL.php +++ b/app/Utils/URL.php @@ -260,12 +260,19 @@ class URL $personal_info = $item['method'].':'.$item['passwd']; $ssurl = "ss://".Tools::base64_url_encode($personal_info)."@".$item['address'].":".$item['port']; + $plugin = ''; if(in_array($item['obfs'], $ss_obfs_list)) { if(strpos($item['obfs'], 'http') !== FALSE) { - $ssurl .= "?plugin=obfs-local%3Bobfs%3Dhttp"; + $plugin .= "obfs-local;obfs=http"; } else { - $ssurl .= "?plugin=obfs-local%3Bobfs%3Dtls"; + $plugin .= "obfs-local;obfs=tls"; } + + if($item['obfs_param'] != '') { + $plugin .= ";obfs-host=".$item['obfs_param']; + } + + $ssurl .= "?plugin=".rawurlencode($plugin); } $ssurl .= "#".rawurlencode(Config::get('appName')." - ".$item['remark']); diff --git a/config/.config.php.example b/config/.config.php.example index 2a419f9..4121797 100644 --- a/config/.config.php.example +++ b/config/.config.php.example @@ -37,7 +37,7 @@ $System_Config['inviteNum'] = '0'; $System_Config['db_driver'] = 'mysql'; $System_Config['db_host'] = 'localhost'; $System_Config['db_database'] = 'sspanel'; -$System_Config['db_username'] = 'sspanel'; +$System_Config['db_username'] = 'root'; $System_Config['db_password'] = 'root'; $System_Config['db_charset'] = 'utf8'; $System_Config['db_collation'] = 'utf8_general_ci'; @@ -298,7 +298,7 @@ $System_Config['sendgrid_sender'] = ''; #支付系统 #取值 paymentwall,zfbjk,spay,f2fpay,none -$System_Config['payment_system']=''; +$System_Config['payment_system']='none'; #PaymentWall $System_Config['pmw_publickey']=''; @@ -315,6 +315,12 @@ $System_Config['zfbjk_pid']=''; $System_Config['zfbjk_key']=''; $System_Config['zfbjk_qrcodeurl']='https://www.zhaojin97.cn/wp-content/uploads/2016/01/630c50ab52bc139b2a33af8cc64e47ad2016010111570425541.jpg'; +#alipay,f2fpay ---> https://91vps.club/2017/06/09/alipay_f2f_ss_panel_mod/ +$System_Config['f2fpay_app_id']=''; +$System_Config['f2fpay_p_id']=''; +$System_Config['alipay_public_key']=''; +$System_Config['merchant_private_key']=''; +$System_Config['f2fpay_activate_key']=''; #请联系 https://t.me/gh012363 #不安全中转模式,这个开启之后使用除了 auth_aes128_md5 或者 auth_aes128_sha1 以外的协议地用户也可以设置和使用中转,但是,强烈推荐不开启。 $System_Config['relay_insecure_mode']='false'; diff --git a/config/routes.php b/config/routes.php index 3d737c1..b7ef5a8 100644 --- a/config/routes.php +++ b/config/routes.php @@ -152,6 +152,8 @@ $app->group('/user', function () { $this->post('/unblock', 'App\Controllers\UserController:Unblock'); $this->get('/bought', 'App\Controllers\UserController:bought'); $this->delete('/bought', 'App\Controllers\UserController:deleteBoughtGet'); + $this->get('/url_reset', 'App\Controllers\UserController:resetURL'); + })->add(new Auth()); // Auth diff --git a/resources/views/material/staff.tpl b/resources/views/material/staff.tpl index 69d9e04..7712fdb 100644 --- a/resources/views/material/staff.tpl +++ b/resources/views/material/staff.tpl @@ -143,7 +143,7 @@
diff --git a/resources/views/material/user/index.tpl b/resources/views/material/user/index.tpl index ba7b227..a261a53 100644 --- a/resources/views/material/user/index.tpl +++ b/resources/views/material/user/index.tpl @@ -101,6 +101,8 @@您好,您目前的 加密方式,混淆,或者协议设置在 ShadowsocksR 客户端下无法连接。请您选用 Shadowsocks 客户端来连接,或者到 资料编辑 页面修改后再来查看此处。
同时, ShadowsocksR 单端口多用户的连接不受您设置的影响,您可以在此使用相应的客户端进行连接~
+ +请注意,在当前状态下您的 SSR 订阅链接已经失效,您无法通过此种方式导入节点。
{/if}推荐下载Shadowrocket,然后在 Safari 中点击这个(普通端口)或者这个(单端口多用户),然后点击确定,就可以批量添加节点。
+SSR 订阅地址:
+ 普通端口地址:{$baseUrl}/link/{$ssr_sub_token}?mu=0
+ 单端口多用户端口地址:{$baseUrl}/link/{$ssr_sub_token}?mu=1
+
下载,安装,然后在手机上默认浏览器中点击这个链接(普通端口)或者这个链接(单端口多用户),然后点击确定,批量添加完节点,然后路由选择绕过大陆,右上角开启就可以上网了。同时提供一个 ACL 地址,长按复制地址到客户端里应用即可。