Compare commits
25
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f8c513a3e | ||
|
|
ae65f9bd00 | ||
|
|
741467eb1e | ||
|
|
350b2a12f1 | ||
|
|
2621df96e0 | ||
|
|
aeafbf9ec9 | ||
|
|
c1aef98692 | ||
|
|
0408aea675 | ||
|
|
ede1e1bdc4 | ||
|
|
dd98c320e9 | ||
|
|
e9b0a68c0c | ||
|
|
a8e7026457 | ||
|
|
39d7277f4b | ||
|
|
360c155fae | ||
|
|
ffa338f0ee | ||
|
|
c54735c487 | ||
|
|
ad9a4fe587 | ||
|
|
d8a509114a | ||
|
|
6e1a2ed1fe | ||
|
|
1477b56ba7 | ||
|
|
2e5cec6a05 | ||
|
|
1034414bfc | ||
|
|
89a7a1720d | ||
|
|
8b78424a18 | ||
|
|
54438581f9 |
No files matched your search
+2
-1
@@ -1,7 +1,8 @@
|
||||
SITE_PROFILE=dpl
|
||||
APP_NAME=XBoard
|
||||
APP_FULL_NAME="Deep Link"
|
||||
APP_ENV=production
|
||||
APP_KEY=base64:PZXk5vTuTinfeEVG5FpYv2l6WEhLsyvGpiWK7IgJJ60=
|
||||
APP_KEY=
|
||||
APP_DEBUG=false
|
||||
APP_URL=http://localhost
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
SITE_PROFILE=hn
|
||||
SITE_THEME=EZ
|
||||
APP_NAME=hardnerd
|
||||
APP_FULL_NAME=hardnerd.net
|
||||
APP_ENV=production
|
||||
APP_DEBUG=false
|
||||
APP_URL=https://hardnerd.net
|
||||
APP_KEY=
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=hn
|
||||
DB_USERNAME=hn
|
||||
DB_PASSWORD=
|
||||
CACHE_DRIVER=redis
|
||||
QUEUE_CONNECTION=redis
|
||||
SESSION_DRIVER=file
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PORT=6379
|
||||
CACHE_PREFIX=hn_cache
|
||||
REDIS_PREFIX=hn_database_
|
||||
HORIZON_PREFIX=hn_horizon:
|
||||
SESSION_COOKIE=hn_session
|
||||
LOG_CHANNEL=stack
|
||||
@@ -48,3 +48,8 @@ compose.split.yaml
|
||||
|
||||
/macos-client/.swiftpm/
|
||||
/storage/app/private/
|
||||
|
||||
# hn loopback development marker
|
||||
/storage/framework/ez-vite.hot*
|
||||
|
||||
/storage/framework/hardnerd-vite.hot*
|
||||
@@ -1,3 +1,6 @@
|
||||
[submodule "public/assets/admin"]
|
||||
path = public/assets/admin
|
||||
url = https://github.com/cedar2025/xboard-admin-dist.git
|
||||
[submodule "ez-theme"]
|
||||
path = frontends/ez-theme
|
||||
url = https://github.com/EZTHEME/EZ_THEME.git
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\PaymentHealth\Monitor;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class PaymentHealthCheck extends Command
|
||||
{
|
||||
protected $signature='payment:health-check';
|
||||
protected $description='Probe configured EPay cashiers once per six-hour slot and manage only monitor-owned outages';
|
||||
public function handle(Monitor $monitor): int
|
||||
{
|
||||
try{$this->line(json_encode($monitor->run(),JSON_UNESCAPED_UNICODE|JSON_THROW_ON_ERROR));return self::SUCCESS;}
|
||||
catch(\Throwable $e){$this->error('payment_health_failed_closed: '.get_class($e));return self::FAILURE;}
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ class Kernel extends ConsoleKernel
|
||||
protected function schedule(Schedule $schedule): void
|
||||
{
|
||||
$schedule->command('telegram:tickets:retry')->everyMinute()->withoutOverlapping();
|
||||
$schedule->command('payment:health-check')->timezone('Asia/Shanghai')->cron('0 */6 * * *')->withoutOverlapping(30);
|
||||
Cache::put(CacheKey::get('SCHEDULE_LAST_CHECK_AT', null), time());
|
||||
// v2board
|
||||
$schedule->command('xboard:statistics')->dailyAt('0:10')->onOneServer();
|
||||
|
||||
@@ -32,7 +32,7 @@ class PlanController extends Controller
|
||||
return $this->success(PlanResource::make($plan));
|
||||
}
|
||||
|
||||
$plans = $this->planService->getAvailablePlans();
|
||||
$plans = $this->planService->getAvailablePlans($user);
|
||||
return $this->success(PlanResource::collection($plans));
|
||||
}
|
||||
}
|
||||
@@ -217,6 +217,7 @@ class ConfigController extends Controller
|
||||
public function save(ConfigSave $request)
|
||||
{
|
||||
$data = $request->validated();
|
||||
\App\Support\SiteProfile::assertSettingsWritable($data);
|
||||
|
||||
$templateKeys = [
|
||||
'subscribe_template_singbox' => 'singbox',
|
||||
|
||||
@@ -7,6 +7,14 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Payment extends Model
|
||||
{
|
||||
protected $table = 'v2_payment';
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::updating(function (Payment $payment) {
|
||||
\App\Services\PaymentHealth\Ownership::clear($payment);
|
||||
});
|
||||
}
|
||||
|
||||
protected $dateFormat = 'U';
|
||||
protected $guarded = ['id'];
|
||||
protected $casts = [
|
||||
|
||||
@@ -28,6 +28,10 @@ class SettingServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// dpl keeps its existing environment and database settings.
|
||||
if (\App\Support\SiteProfile::isHn()) {
|
||||
config(['app.name' => config('site.name'), 'app.full_name' => config('site.full_name')]);
|
||||
}
|
||||
// App URL is forced per-request via middleware (Octane-safe).
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace App\Services\PaymentHealth;
|
||||
use App\Models\Payment;
|
||||
class ChannelIdentity
|
||||
{
|
||||
public static function revision(Payment $p):string
|
||||
{
|
||||
$config=$p->config??[];ksort($config);
|
||||
return hash_hmac('sha256',json_encode([$p->uuid,$p->payment,$config,$p->notify_domain],JSON_THROW_ON_ERROR),(string)config('app.key'));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
namespace App\Services\PaymentHealth;
|
||||
|
||||
use App\Models\Payment;
|
||||
use App\Services\PaymentService;
|
||||
use Illuminate\Http\Client\ConnectionException;
|
||||
use RuntimeException;
|
||||
|
||||
class EpayProbe
|
||||
{
|
||||
public function __construct(private HttpsTransport $transport,private QrEvidence $qr) {}
|
||||
public function supports(Payment $p): bool
|
||||
{return strcasecmp((string)$p->payment,'EPay')===0&&in_array($p->config['type']??null,['alipay','wxpay'],true)&&!empty($p->config['url'])&&!empty($p->config['pid'])&&!empty($p->config['key']);}
|
||||
|
||||
public function probe(Payment $p,string $tradeNo): array
|
||||
{
|
||||
try{
|
||||
$amount=(int)config('payment_health.amount_cents',3200);
|
||||
$url=$this->paymentUrl($p,$tradeNo,$amount);$fields=[];parse_str(parse_url($url,PHP_URL_QUERY)??'',$fields);
|
||||
$url=preg_replace('/\?.*$/','',$url);
|
||||
if(($fields['out_trade_no']??null)!==$tradeNo||!is_string($fields['sign']??null)||!preg_match('/\A[0-9a-f]{32}\z/i',$fields['sign'])||!is_scalar($fields['money']??null)||(int)round((float)$fields['money']*100)!==$amount)throw new RuntimeException('invalid_probe_payload');
|
||||
$method='POST';$type=$p->config['type'];
|
||||
for($hop=0;$hop<4;$hop++){
|
||||
$r=$this->transport->request($method,$url,$fields,$hop>0);$status=$r['status'];$body=$r['body'];
|
||||
$meta=['http'=>$status,'host'=>$r['host'],'body_sha256'=>$r['sha256']];
|
||||
if($status===404||$status===410)return $this->result('hard_failure','cashier_not_found',$meta);
|
||||
if($status>=500||$status===408||$status===429)return $this->result('soft_failure','cashier_transient',$meta);
|
||||
if($status>=300&&$status<400&&$r['location']){$url=$this->absolute($url,$r['location']);$method='GET';$fields=[];continue;}
|
||||
if($status!==200)return $this->result('indeterminate','unexpected_http',$meta);
|
||||
if(preg_match('/订单.{0,5}(?:超时|过期)|签名错误|商户不存在|商户未配置|未配置支付接口商户|支付通道.{0,10}(?:关闭|维护|不可用)|invalid merchant|payment unavailable|<title>\s*404/iu',$body))return $this->result('hard_failure','cashier_business_error',$meta);
|
||||
if($this->qr->valid($body,$type,$amount))return $this->result('healthy','fresh_cashier_qr',$meta+['amount_cents'=>$amount,'qr_evidence'=>true]);
|
||||
// Follow only recognized provider handoffs; every host is rechecked by the transport.
|
||||
$doc=new \DOMDocument();@$doc->loadHTML($body);$form=$doc->getElementsByTagName('form')->item(0);
|
||||
if($form){
|
||||
$next=[];foreach($form->getElementsByTagName('input')as$input)if($input->hasAttribute('name'))$next[$input->getAttribute('name')]=$input->getAttribute('value');
|
||||
if(count($next)>30)return $this->result('indeterminate','unexpected_form',$meta);
|
||||
if(isset($next['money'])&&(int)round((float)$next['money']*100)!==$amount)return $this->result('hard_failure','cashier_amount_mismatch',$meta);
|
||||
if(!in_array(strtoupper($form->getAttribute('method')?:'GET'),['GET','POST'],true))return $this->result('indeterminate','unexpected_form_method',$meta);
|
||||
$url=$this->absolute($url,$form->getAttribute('action'));$method=strtoupper($form->getAttribute('method')?:'GET');$fields=$next;
|
||||
if($method==='GET'){$url.=(str_contains($url,'?')?'&':'?').http_build_query($fields);$fields=[];}
|
||||
continue;
|
||||
}
|
||||
if(preg_match('/(?:window\.)?location\.replace\((["\x27])(.*?)\1\)|(?:window\.)?location\.href\s*=\s*(["\x27])(.*?)\3/s',$body,$m)){
|
||||
$url=$this->absolute($url,html_entity_decode(str_replace('\\/','/',($m[2]??'')?:($m[4]??'')),ENT_QUOTES));$method='GET';$fields=[];continue;
|
||||
}
|
||||
return $this->result('indeterminate','no_verified_qr',$meta);
|
||||
}
|
||||
return $this->result('indeterminate','handoff_limit');
|
||||
}catch(ConnectionException $e){return $this->result('soft_failure','network_timeout');}
|
||||
catch(RuntimeException $e){
|
||||
$reason=$e->getMessage();
|
||||
if(in_array($reason,['unapproved_host','unsafe_url','nonpublic_dns','ip_literal_not_allowed'],true))return $this->result('review_required',$reason);
|
||||
if($reason==='dns_unavailable')return $this->result('soft_failure',$reason);
|
||||
return $this->result('indeterminate','probe_error');
|
||||
}catch(\Throwable $e){return $this->result('indeterminate','probe_error');}
|
||||
}
|
||||
protected function paymentUrl(Payment $p,string $tradeNo,int $cents): string
|
||||
{
|
||||
$result=(new PaymentService($p->payment,$p->id))->pay(['trade_no'=>$tradeNo,'total_amount'=>$cents,'user_id'=>0,'stripe_token'=>null]);
|
||||
if(($result['type']??null)!==1||!is_string($result['data']??null))throw new RuntimeException('unsupported_response');
|
||||
return $result['data'];
|
||||
}
|
||||
private function absolute(string $base,string $value):string
|
||||
{
|
||||
if(str_starts_with($value,'//'))return 'https:'.$value;
|
||||
if(parse_url($value,PHP_URL_SCHEME)!==null)return $value;
|
||||
$host=parse_url($base,PHP_URL_HOST);return 'https://'.$host.(str_starts_with($value,'/')?'':rtrim(dirname(parse_url($base,PHP_URL_PATH)?:'/'),'/').'/').$value;
|
||||
}
|
||||
private function result(string $status,string $reason,array $meta=[]):array
|
||||
{return ['status'=>$status,'reason'=>$reason]+$meta;}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
namespace App\Services\PaymentHealth;
|
||||
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use RuntimeException;
|
||||
|
||||
class HttpsTransport
|
||||
{
|
||||
public function request(string $method,string $url,array $fields=[],bool $downstream=false): array
|
||||
{
|
||||
[$host,$ip]=$this->endpoint($url,$downstream);
|
||||
$client=Http::withoutRedirecting()->connectTimeout(10)->timeout(25)->withUserAgent('XB-PaymentHealth/1.0')
|
||||
->withOptions(['verify'=>true,'curl'=>[CURLOPT_RESOLVE=>[$host.':443:'.(str_contains($ip,':')?'['.$ip.']':$ip)]]]);
|
||||
$response=$method==='POST'?$client->asForm()->post($url,$fields):$client->get($url);
|
||||
$body=$response->body();if(strlen($body)>2097152)throw new RuntimeException('oversized_cashier_response');
|
||||
return ['status'=>$response->status(),'body'=>$body,'location'=>$response->header('Location'),'host'=>$host,'sha256'=>hash('sha256',$body)];
|
||||
}
|
||||
protected function endpoint(string $url,bool $downstream):array
|
||||
{
|
||||
$parts=parse_url($url);$host=strtolower($parts['host']??'');
|
||||
if (($parts['scheme']??'')!=='https'||!$host||isset($parts['user'])||isset($parts['pass'])||isset($parts['fragment'])||($parts['port']??443)!==443) throw new RuntimeException('unsafe_url');
|
||||
if(filter_var(trim($host,'[]'),FILTER_VALIDATE_IP))throw new RuntimeException('ip_literal_not_allowed');
|
||||
if(!preg_match('/\A(?=.{1,253}\z)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}\z/D',$host))throw new RuntimeException('unsafe_url');
|
||||
// Only EpayProbe may mark a URL as a handoff after a validated gateway response.
|
||||
if(!in_array($host,config('payment_health.allowed_hosts',[]),true)&&!($downstream&&config('payment_health.dynamic_handoffs',true)))throw new RuntimeException('unapproved_host');
|
||||
return [$host,$this->publicAddress($host)];
|
||||
}
|
||||
protected function records(string $host):array
|
||||
{return dns_get_record($host,DNS_A|DNS_AAAA)?:[];}
|
||||
protected function publicAddress(string $host): string
|
||||
{
|
||||
if(filter_var($host,FILTER_VALIDATE_IP)) throw new RuntimeException('ip_literal_not_allowed');
|
||||
$records=$this->records($host);$ips=[];
|
||||
foreach($records?:[] as $r){$ip=$r['ip']??$r['ipv6']??null;if(!$ip)continue;
|
||||
if(str_starts_with(strtolower($ip),'::ffff:'))throw new RuntimeException('nonpublic_dns');
|
||||
$packed=@inet_pton($ip);$multicast=$packed!==false&&((strlen($packed)===4&&ord($packed[0])>=224)||(strlen($packed)===16&&ord($packed[0])===255));
|
||||
if(!filter_var($ip,FILTER_VALIDATE_IP,FILTER_FLAG_GLOBAL_RANGE)||$multicast)throw new RuntimeException('nonpublic_dns');$ips[]=$ip;}
|
||||
if(!$ips)throw new RuntimeException('dns_unavailable');
|
||||
return $ips[0];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
namespace App\Services\PaymentHealth;
|
||||
|
||||
use App\Models\Payment;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use RuntimeException;
|
||||
|
||||
class Monitor
|
||||
{
|
||||
public function __construct(private EpayProbe $probe,private TeleHubReporter $reporter) {}
|
||||
|
||||
public function run(): array
|
||||
{
|
||||
if(!config('payment_health.enabled',true))return ['status'=>'disabled','channels'=>[]];
|
||||
$store=new StateStore(config('payment_health.state_path'));
|
||||
if(!$store->acquire())return ['status'=>'locked','channels'=>[]];
|
||||
try{
|
||||
$state=$store->read();$instance=$this->instance();
|
||||
if(isset($state['instance'])&&$state['instance']!==$instance)throw new RuntimeException('health_state_instance_mismatch');
|
||||
$state['instance']=$instance;$now=CarbonImmutable::now(config('payment_health.timezone','Asia/Shanghai'));
|
||||
$day=$now->format('Y-m-d');$slot=$day.'-'.intdiv($now->hour,6);$results=[];
|
||||
foreach(Payment::orderBy('id')->get()as$p){
|
||||
if(!$this->probe->supports($p)||in_array($p->id,config('payment_health.excluded_ids',[]),true)){$results[]=['id'=>$p->id,'status'=>'unsupported_or_excluded'];continue;}
|
||||
$id=(string)$p->uuid;$revision=$this->revision($p);$old=$state['channels'][$id]??[];
|
||||
$policy=hash('sha256',json_encode(['handoff_v2',config('payment_health.allowed_hosts',[]),(bool)config('payment_health.dynamic_handoffs',true)]));
|
||||
if(($old['status']??null)==='review_required'&&($old['policy']??null)!==$policy)$old['status']='policy_changed';
|
||||
if(($old['revision']??null)!==$revision)$old=['slot'=>$old['slot']??null];
|
||||
$lease=Ownership::lease($p);
|
||||
$managed=$lease!==null;
|
||||
$old['managed_disabled']=$managed;
|
||||
if($managed){$old['managed_disabled']=true;$old['expected_updated_at']=$lease['expected_updated_at'];}
|
||||
// A toggle or settings edit made outside this monitor releases automatic ownership.
|
||||
if($managed&&($p->enable||($old['expected_updated_at']??null)!==(string)$p->getRawOriginal('updated_at'))){$managed=false;$old['managed_disabled']=false;}
|
||||
if(!$p->enable&&!$managed){$old['status']='manual_disabled';$old['revision']=$revision;$state['channels'][$id]=$old;$store->save($state);$results[]=['id'=>$p->id,'status'=>'manual_disabled'];continue;}
|
||||
if(($old['slot']??null)===$slot||($old['status']??null)==='review_required'){$results[]=['id'=>$p->id,'status'=>'already_checked_or_review'];continue;}
|
||||
if(($state['budget'][$day]??0)>=(int)config('payment_health.daily_probe_limit',8)){$results[]=['id'=>$p->id,'status'=>'daily_budget_reached'];continue;}
|
||||
// Persist the claim before any external request. An interrupted run consumes this slot.
|
||||
$current=$old+['managed_disabled'=>false,'soft_failures'=>0];
|
||||
unset($current['action']);
|
||||
$current['slot']=$slot;$current['revision']=$revision;$current['policy']=$policy;$current['phase']='claimed';$current['claimed_at']=$now->toIso8601String();
|
||||
$state['channels'][$id]=$current;$state['budget']=[$day=>($state['budget'][$day]??0)+1];$store->save($state);
|
||||
$trade='PH'.gmdate('YmdHis').bin2hex(random_bytes(8));$out=$this->probe->probe($p,$trade);
|
||||
if(!in_array($out['status']??null,['healthy','hard_failure','soft_failure','indeterminate','review_required'],true))throw new RuntimeException('invalid_probe_result');
|
||||
$current['phase']='checked';$current['status']=$out['status'];$current['reason']=$out['reason'];$current['checked_at']=$now->toIso8601String();
|
||||
$current['evidence']=$out;$current['soft_failures']=$out['status']==='soft_failure'?($old['soft_failures']??0)+1:0;
|
||||
$target=null;$auto=(bool)config('payment_health.auto_toggle',true);
|
||||
if($auto&&$p->enable&&($out['status']==='hard_failure'||($out['status']==='soft_failure'&&$current['soft_failures']>=config('payment_health.soft_failure_threshold',2))))$target=false;
|
||||
if($auto&&!$p->enable&&$managed&&$out['status']==='healthy')$target=true;
|
||||
if($target!==null){
|
||||
$current['phase']='toggle_pending';$state['channels'][$id]=$current;$store->save($state);
|
||||
$changed=DB::transaction(function()use($p,$revision,$target){
|
||||
$fresh=Payment::lockForUpdate()->find($p->id);
|
||||
if(!$fresh||$this->revision($fresh)!==$revision||$fresh->enable!==$p->enable||$fresh->getRawOriginal('updated_at')!==$p->getRawOriginal('updated_at'))return null;
|
||||
$fresh->enable=$target;$fresh->save();
|
||||
if($target)Ownership::clear($fresh);else Ownership::record($fresh);
|
||||
return $fresh;
|
||||
});
|
||||
if($changed){$current['managed_disabled']=!$target;$current['expected_updated_at']=(string)$changed->getRawOriginal('updated_at');$current['phase']='applied';$current['action']=$target?'enabled':'disabled';}
|
||||
else{$current['status']='manual_override';$current['managed_disabled']=false;$current['phase']='skipped';}
|
||||
}
|
||||
if(($old['status']??null)!==$current['status']||$target!==null){
|
||||
// Healthy first checks are quiet. Emit only useful failures, transitions, and recoveries.
|
||||
if($current['status']!=='healthy'||!empty($old['status']))$this->event($state,$p,$current,$instance,$now);
|
||||
}
|
||||
$state['channels'][$id]=$current;$store->save($state);$results[]=['id'=>$p->id,'status'=>$current['status'],'action'=>$current['action']??null];
|
||||
}
|
||||
foreach($state['events']as$key=>$event){
|
||||
if(in_array($event['delivery']['status']??'', ['sent','failed','uncertain','cancelled'],true))continue;
|
||||
$delivery=$this->reporter->deliver($event+($event['delivery']??[]));$state['events'][$key]['delivery']=$delivery;$store->save($state);
|
||||
}
|
||||
return ['status'=>'complete','channels'=>$results,'notifications'=>array_count_values(array_map(fn($e)=>$e['delivery']['status']??'local_pending',$state['events']))];
|
||||
}finally{$store->release();}
|
||||
}
|
||||
private function instance():string
|
||||
{
|
||||
$db=config('database.connections.'.config('database.default').'.database');
|
||||
return substr(hash('sha256',(string)config('app.url').'|'.(string)$db),0,20);
|
||||
}
|
||||
private function revision(Payment $p):string
|
||||
{
|
||||
return ChannelIdentity::revision($p);
|
||||
}
|
||||
private function event(array &$state,Payment $p,array $c,string $instance,CarbonImmutable $now):void
|
||||
{
|
||||
$n=($state['event_sequence']??0)+1;$state['event_sequence']=$n;
|
||||
$key='xb.payment-health.'.$instance.'.'.$n;
|
||||
$recovered=$c['status']==='healthy';$label=mb_substr((string)(config('payment_health.site_label')?:admin_setting('app_name','XB')),0,80);
|
||||
// Channel labels are administrative text. No URLs, signatures, order IDs or user data are sent.
|
||||
$name=mb_substr(preg_replace('/[\r\n]/u',' ',(string)$p->name),0,80);
|
||||
$text='【'.$label.' - 支付通道'.($recovered?'恢复':'异常').'】'."\n通道:".$name.'('.$p->id.')'."\n时间:".$now->format('Y-m-d H:i:s T')."\n检测:".$c['reason']."\n处理:".($c['action']??'保持现状,需检查')."\n范围:仅收银可用性,未实际付款";
|
||||
$state['events'][$key]=['key'=>$key,'bot'=>$recovered?'notification':'error','text'=>$text];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace App\Services\PaymentHealth;
|
||||
use App\Models\{Payment,Setting};
|
||||
|
||||
class Ownership
|
||||
{
|
||||
private static function key(Payment $p):string{return 'payment_health_lease_'.$p->uuid;}
|
||||
public static function record(Payment $p): void
|
||||
{
|
||||
// Written in the same database transaction as enable=false: callback safety survives a process crash.
|
||||
Setting::createOrUpdate(self::key($p),['payment_id'=>$p->id,'uuid'=>$p->uuid,'revision'=>ChannelIdentity::revision($p),'disabled_at'=>time(),'expected_updated_at'=>(string)$p->getRawOriginal('updated_at')]);
|
||||
}
|
||||
public static function clear(Payment $p):void{Setting::where('name',self::key($p))->delete();}
|
||||
public static function lease(Payment $p):?array
|
||||
{
|
||||
if($p->enable)return null;
|
||||
$lease=Setting::where('name',self::key($p))->value('value');
|
||||
if(!is_array($lease)||($lease['payment_id']??null)!==$p->id||($lease['uuid']??null)!==$p->uuid||($lease['revision']??null)!==ChannelIdentity::revision($p)||($lease['expected_updated_at']??null)!==(string)$p->getRawOriginal('updated_at'))return null;
|
||||
return $lease;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
namespace App\Services\PaymentHealth;
|
||||
|
||||
class QrEvidence
|
||||
{
|
||||
public function valid(string $html,string $type,int $cents): bool
|
||||
{
|
||||
$plain=html_entity_decode(strip_tags($html),ENT_QUOTES|ENT_HTML5);
|
||||
$amount=number_format($cents/100,2,'.','');
|
||||
$amountSeen=preg_match('/(?<![0-9.])'.preg_quote($amount,'/').'(?![0-9.])/u',$plain)
|
||||
|| preg_match('/(?:money|amount|price)["\x27\s:=]+'.preg_quote($amount,'/').'(?![0-9.])/i',$html);
|
||||
if(!$amountSeen)return false;
|
||||
$uri=$type==='wxpay'?'(?:wxpay:\/\/|weixin:\/\/wxpay\/)':'(?:alipays:\/\/|https:\/\/qr\.alipay\.com\/)';
|
||||
if(!preg_match('~'.$uri.'[^\s"\x27<>]+~i',$html))return false;
|
||||
// Structured rendering of a real payment URI, or a QR bitmap with three finder patterns.
|
||||
if(preg_match('~(?:new\s+QRCode|\.qrcode\s*\(|QRCode\.to(?:Canvas|DataURL|String))~i',$html))return true;
|
||||
if(preg_match_all('~data:image/png;base64,([A-Za-z0-9+/=]+)~',$html,$matches))foreach($matches[1]as$data){
|
||||
$bytes=base64_decode($data,true);if($bytes!==false&&strlen($bytes)<=524288&&$this->hasFinders($bytes))return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public function hasFinders(string $png): bool
|
||||
{
|
||||
if(!function_exists('imagecreatefromstring'))return false;
|
||||
$im=@imagecreatefromstring($png);if(!$im)return false;
|
||||
try{
|
||||
$w=imagesx($im);$h=imagesy($im);if($w<21||$w>600||abs($w-$h)>2)return false;
|
||||
$black=static function(int $x,int $y)use($im):bool{$c=imagecolorat($im,$x,$y);$rgb=imagecolorsforindex($im,$c);return ($rgb['red']+$rgb['green']+$rgb['blue'])<384;};
|
||||
$points=[];
|
||||
for($y=0;$y<$h;$y+=2){$runs=[];$last=false;$len=0;
|
||||
for($x=0;$x<=$w;$x++){$current=$x<$w?$black($x,$y):!$last;
|
||||
if($x===0){$last=$current;$len=1;continue;}if($current===$last){$len++;continue;}
|
||||
$runs[]=['black'=>$last,'len'=>$len,'end'=>$x];if(count($runs)>5)array_shift($runs);
|
||||
if(count($runs)===5&&$runs[0]['black']&&!$runs[1]['black']&&$runs[2]['black']&&!$runs[3]['black']&&$runs[4]['black']){
|
||||
$r=array_column($runs,'len');$module=array_sum($r)/7;
|
||||
if($this->ratio($r,$module)){$cx=(int)round($x-$r[4]-$r[3]-$r[2]/2);if($this->vertical($black,$cx,$y,$h,$module)){
|
||||
$duplicate=false;foreach($points as$p)if(hypot($cx-$p[0],$y-$p[1])<8*$module){$duplicate=true;break;}
|
||||
if(!$duplicate)$points[]=[$cx,$y];
|
||||
}}
|
||||
}$last=$current;$len=1;
|
||||
}
|
||||
}
|
||||
foreach($points as$a)foreach($points as$b)foreach($points as$c){$ab=[$b[0]-$a[0],$b[1]-$a[1]];$ac=[$c[0]-$a[0],$c[1]-$a[1]];$u=hypot(...$ab);$v=hypot(...$ac);
|
||||
if($u>12&&$v>12&&min($u,$v)/max($u,$v)>.65&&abs($ab[0]*$ac[0]+$ab[1]*$ac[1])/($u*$v)<.25)return true;}
|
||||
return false;
|
||||
}finally{imagedestroy($im);}
|
||||
}
|
||||
private function ratio(array $r,float $m):bool
|
||||
{if($m<1)return false;foreach([0,1,3,4]as$i)if(abs($r[$i]-$m)>$m*.75)return false;return abs($r[2]-3*$m)<$m*1.25;}
|
||||
private function vertical(callable $black,int $x,int $y,int $h,float $m):bool
|
||||
{
|
||||
$r=[0,0,0,0,0];for($i=$y;$i>=0&&$black($x,$i);$i--)$r[2]++;
|
||||
for(;$i>=0&&!$black($x,$i);$i--)$r[1]++;
|
||||
for(;$i>=0&&$black($x,$i);$i--)$r[0]++;
|
||||
for($i=$y+1;$i<$h&&$black($x,$i);$i++)$r[2]++;
|
||||
for(;$i<$h&&!$black($x,$i);$i++)$r[3]++;
|
||||
for(;$i<$h&&$black($x,$i);$i++)$r[4]++;
|
||||
return $this->ratio($r,array_sum($r)/7)&&abs(array_sum($r)/7-$m)<$m;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
namespace App\Services\PaymentHealth;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class StateStore
|
||||
{
|
||||
private $handle;
|
||||
public function __construct(private string $path) {}
|
||||
|
||||
public function acquire(): bool
|
||||
{
|
||||
$dir=dirname($this->path);
|
||||
$newDirectory=!is_dir($dir);$parent=dirname($dir);while(!is_dir($parent)&&dirname($parent)!==$parent)$parent=dirname($parent);
|
||||
if ($newDirectory && !mkdir($dir,0700,true) && !is_dir($dir)) throw new RuntimeException('state_directory_failed');
|
||||
if($newDirectory&&function_exists('posix_geteuid')&&posix_geteuid()===0){chown($dir,fileowner($parent));chgrp($dir,filegroup($parent));}
|
||||
if (is_link($dir) || is_link($this->path) || is_link($this->path.'.lock')) throw new RuntimeException('unsafe_state_path');
|
||||
$this->handle=fopen($this->path.'.lock','c+');
|
||||
if (!$this->handle) throw new RuntimeException('state_lock_failed');
|
||||
chmod($this->path.'.lock',0600);
|
||||
$this->inheritOwner($this->path.'.lock');
|
||||
return flock($this->handle,LOCK_EX|LOCK_NB);
|
||||
}
|
||||
public function read(): array
|
||||
{
|
||||
if (!is_file($this->path)) return ['version'=>1,'channels'=>[],'events'=>[],'budget'=>[]];
|
||||
$value=json_decode(file_get_contents($this->path),true,512,JSON_THROW_ON_ERROR);
|
||||
if (!is_array($value) || ($value['version']??null)!==1 || !is_array($value['channels']??null) || !is_array($value['events']??null) || !is_array($value['budget']??null)) throw new RuntimeException('invalid_health_state');
|
||||
return $value;
|
||||
}
|
||||
public function save(array $state): void
|
||||
{
|
||||
$temp=$this->path.'.'.bin2hex(random_bytes(6)).'.tmp';
|
||||
try {
|
||||
$data=json_encode($state,JSON_UNESCAPED_UNICODE|JSON_THROW_ON_ERROR);
|
||||
$h=fopen($temp,'x');if (!$h) throw new RuntimeException('state_write_failed');
|
||||
chmod($temp,0600);$this->inheritOwner($temp);
|
||||
try {if (fwrite($h,$data)!==strlen($data)) throw new RuntimeException('short_state_write');fflush($h);if(function_exists('fsync'))fsync($h);}finally{fclose($h);}
|
||||
if (!rename($temp,$this->path)) throw new RuntimeException('state_rename_failed');
|
||||
} finally {if(is_file($temp))unlink($temp);}
|
||||
}
|
||||
private function inheritOwner(string $file):void
|
||||
{
|
||||
if(function_exists('posix_geteuid')&&posix_geteuid()===0){chown($file,fileowner(dirname($this->path)));chgrp($file,filegroup(dirname($this->path)));}
|
||||
}
|
||||
public function release(): void
|
||||
{
|
||||
if(is_resource($this->handle)){flock($this->handle,LOCK_UN);fclose($this->handle);}
|
||||
$this->handle=null;
|
||||
}
|
||||
public function __destruct(){ $this->release(); }
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace App\Services\PaymentHealth;
|
||||
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
class TeleHubReporter
|
||||
{
|
||||
public function deliver(array $event): array
|
||||
{
|
||||
$key=(string)config('payment_health.telehub_key');$base=rtrim((string)config('payment_health.telehub_url'),'/');
|
||||
if(!$key||parse_url($base,PHP_URL_SCHEME)!=='https')return ['status'=>'local_pending','reason'=>'telehub_not_configured'];
|
||||
try{
|
||||
$client=Http::withoutRedirecting()->connectTimeout(5)->timeout(15)->withToken($key);
|
||||
if(isset($event['receipt_id'])){
|
||||
$r=$client->get($base.'/api/v1/messages/'.$event['receipt_id']);
|
||||
}else{
|
||||
$r=$client->withHeaders(['Idempotency-Key'=>$event['key']])->post($base.'/api/v1/messages',['bot'=>$event['bot'],'target'=>'base','text'=>$event['text']]);
|
||||
}
|
||||
if(!in_array($r->status(),[200,202],true))return ['status'=>'local_pending','reason'=>'telehub_http_'.$r->status()];
|
||||
$data=$r->json('data');if(!is_array($data)||!is_string($data['id']??null)||!preg_match('/\A[0-9a-f-]{36}\z/i',$data['id']))return ['status'=>'local_pending','reason'=>'telehub_response_invalid'];
|
||||
return ['status'=>$data['status']??'queued','receipt_id'=>$data['id']];
|
||||
}catch(\Throwable $e){return ['status'=>'local_pending','reason'=>'telehub_transport_unknown'];}
|
||||
}
|
||||
}
|
||||
@@ -66,9 +66,19 @@ class PaymentService
|
||||
|
||||
public function notify($params)
|
||||
{
|
||||
if (!$this->config['enable'])
|
||||
throw new ApiException('gate is not enable');
|
||||
return $this->payment->notify($params);
|
||||
if ($this->config['enable']) return $this->payment->notify($params);
|
||||
|
||||
$channel = Payment::find($this->config['id']);
|
||||
$lease = $channel ? \App\Services\PaymentHealth\Ownership::lease($channel) : null;
|
||||
if (!$lease) throw new ApiException('gate is not enable');
|
||||
|
||||
// Never bypass the provider signature, amount, merchant or order-status validation.
|
||||
$result = $this->payment->notify($params);
|
||||
if (!is_array($result) || empty($result['trade_no'])) return false;
|
||||
$order = \App\Models\Order::where('trade_no', $result['trade_no'])
|
||||
->where('payment_id', $channel->id)->first();
|
||||
if (!$order || (int) $order->getRawOriginal('created_at') > (int) $lease['disabled_at']) return false;
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function pay($order)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Plan;
|
||||
use App\Support\SiteProfile;
|
||||
use App\Models\User;
|
||||
use App\Exceptions\ApiException;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
@@ -22,15 +23,30 @@ class PlanService
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAvailablePlans(): Collection
|
||||
public function getAvailablePlans(?User $user = null): Collection
|
||||
{
|
||||
return Plan::where('show', true)
|
||||
->where('sell', true)
|
||||
->orderBy('sort')
|
||||
->get()
|
||||
->filter(function ($plan) {
|
||||
return $this->hasCapacity($plan);
|
||||
});
|
||||
$privateIds = $this->adminOnlyPlanIds();
|
||||
$administrator = $user && $user->is_admin;
|
||||
return Plan::where(function ($query) use ($privateIds, $administrator) {
|
||||
$query->where('show', true);
|
||||
if ($administrator && $privateIds) $query->orWhereIn('id', $privateIds);
|
||||
})
|
||||
->when(!$administrator && $privateIds, fn ($query) => $query->whereNotIn('id', $privateIds))
|
||||
->where('sell', true)->orderBy('sort')->get()
|
||||
->filter(fn ($plan) => $this->hasCapacity($plan));
|
||||
}
|
||||
|
||||
private function adminOnlyPlanIds(): array
|
||||
{
|
||||
if (!SiteProfile::isHn()) return [];
|
||||
$ids = admin_setting('hn_admin_only_plan_ids', []);
|
||||
if (!is_array($ids)) return [];
|
||||
return array_values(array_unique(array_filter(array_map('intval', $ids), fn ($id) => $id > 0)));
|
||||
}
|
||||
|
||||
private function isAdminOnlyPlan(Plan $plan): bool
|
||||
{
|
||||
return in_array((int) $plan->id, $this->adminOnlyPlanIds(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,6 +73,11 @@ class PlanService
|
||||
*/
|
||||
public function isPlanAvailableForUser(Plan $plan, User $user): bool
|
||||
{
|
||||
if ($this->isAdminOnlyPlan($plan)) {
|
||||
return (bool) $user->is_admin && $plan->sell
|
||||
&& ($user->plan_id === $plan->id ? $plan->renew : $this->hasCapacity($plan));
|
||||
}
|
||||
|
||||
// 如果是续费
|
||||
if ($user->plan_id === $plan->id) {
|
||||
return $plan->renew;
|
||||
@@ -72,6 +93,11 @@ class PlanService
|
||||
throw new ApiException(__('Subscription plan does not exist'));
|
||||
}
|
||||
|
||||
// Check before every period, including reset traffic and existing-plan renewals.
|
||||
if ($this->isAdminOnlyPlan($this->plan) && (!$user->is_admin || !$this->plan->sell)) {
|
||||
throw new ApiException(__('Subscription plan does not exist'));
|
||||
}
|
||||
|
||||
// 转换周期格式为新版格式
|
||||
$periodKey = self::getPeriodKey($period);
|
||||
$price = $this->plan->prices[$periodKey] ?? null;
|
||||
@@ -149,6 +175,13 @@ class PlanService
|
||||
|
||||
protected function validatePlanAvailability(User $user): void
|
||||
{
|
||||
if ($this->isAdminOnlyPlan($this->plan)) {
|
||||
if (!$user->is_admin || !$this->plan->sell || (!$this->plan->renew && $user->plan_id === $this->plan->id)) {
|
||||
throw new ApiException(__('This subscription cannot be purchased'));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ((!$this->plan->show && !$this->plan->renew) || (!$this->plan->show && $user->plan_id !== $this->plan->id)) {
|
||||
throw new ApiException(__('This subscription has been sold out, please choose another subscription'));
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class ThemeService
|
||||
private const USER_THEME_DIR = '/storage/theme/';
|
||||
private const CONFIG_FILE = 'config.json';
|
||||
private const SETTING_PREFIX = 'theme_';
|
||||
private const SYSTEM_THEMES = ['Xboard', 'v2board'];
|
||||
private const SYSTEM_THEMES = ['Xboard', 'v2board', 'EZ', 'Hardnerd'];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -190,6 +190,7 @@ class ThemeService
|
||||
return true;
|
||||
}
|
||||
|
||||
\App\Support\SiteProfile::assertSettingsWritable(['frontend_theme' => $theme]);
|
||||
$currentTheme = admin_setting('current_theme');
|
||||
|
||||
try {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use RuntimeException;
|
||||
|
||||
final class EzAssets
|
||||
{
|
||||
public static function scripts(Request $request): array
|
||||
{
|
||||
$origin = 'http://hn.loc/__hn_vite';
|
||||
$marker = storage_path('framework/ez-vite.hot');
|
||||
if (in_array($request->getHost(), ['127.0.0.1', 'localhost', '::1', 'hn.loc'], true)
|
||||
&& is_file($marker) && trim(file_get_contents($marker)) === $origin) {
|
||||
$socket = @fsockopen('127.0.0.1', 5184, $error, $message, 0.1);
|
||||
if ($socket) {
|
||||
fclose($socket);
|
||||
return ['scripts' => ['/__hn_vite/@vite/client', '/__hn_vite/main.js'], 'styles' => []];
|
||||
}
|
||||
}
|
||||
$manifest = base_path('theme/EZ/assets/.vite/manifest.json');
|
||||
if (!is_file($manifest)) {
|
||||
throw new RuntimeException('EZ assets missing: run npm ci && npm run build:hn in frontends/.');
|
||||
}
|
||||
$entries = json_decode(file_get_contents($manifest), true, flags: JSON_THROW_ON_ERROR);
|
||||
$entry = $entries['index.html'];
|
||||
return ['scripts' => ['/theme/EZ/assets/'.$entry['file']], 'styles' => array_map(fn ($file) => '/theme/EZ/assets/'.$file, $entry['css'] ?? [])];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use RuntimeException;
|
||||
|
||||
final class HardnerdAssets
|
||||
{
|
||||
public static function scripts(Request $request): array
|
||||
{
|
||||
$origin = 'http://127.0.0.1:5175';
|
||||
$marker = storage_path('framework/hardnerd-vite.hot');
|
||||
if (in_array($request->getHost(), ['127.0.0.1', 'localhost', '::1', 'hn.loc'], true)
|
||||
&& is_file($marker) && trim(file_get_contents($marker)) === $origin) {
|
||||
$socket = @fsockopen('127.0.0.1', 5175, $error, $message, 0.1);
|
||||
if ($socket) {
|
||||
fclose($socket);
|
||||
return ['scripts' => [$origin.'/@vite/client', $origin.'/src/main.js'], 'styles' => []];
|
||||
}
|
||||
}
|
||||
$manifest = base_path('theme/Hardnerd/assets/.vite/manifest.json');
|
||||
if (!is_file($manifest)) {
|
||||
throw new RuntimeException('Hardnerd assets missing: run npm ci && npm run build:hardnerd in frontends/.');
|
||||
}
|
||||
$entries = json_decode(file_get_contents($manifest), true, flags: JSON_THROW_ON_ERROR);
|
||||
$entry = $entries['index.html'];
|
||||
return ['scripts' => ['/theme/Hardnerd/assets/'.$entry['file']], 'styles' => array_map(fn ($file) => '/theme/Hardnerd/assets/'.$file, $entry['css'] ?? [])];
|
||||
}
|
||||
}
|
||||
@@ -123,9 +123,9 @@ class Setting
|
||||
}
|
||||
}
|
||||
|
||||
$this->loadedSettings = $settings;
|
||||
$this->loadedSettings = array_replace($settings, SiteProfile::publicSettings());
|
||||
} catch (\Throwable) {
|
||||
$this->loadedSettings = [];
|
||||
$this->loadedSettings = SiteProfile::publicSettings();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
use Illuminate\Validation\ValidationException;
|
||||
|
||||
final class SiteProfile
|
||||
{
|
||||
public static function isHn(): bool
|
||||
{
|
||||
return config('site.profile', 'dpl') === 'hn';
|
||||
}
|
||||
|
||||
public static function publicSettings(): array
|
||||
{
|
||||
return self::isHn() ? [
|
||||
'frontend_theme' => config('site.theme', 'EZ'),
|
||||
'app_name' => config('site.name'),
|
||||
'logo' => config('site.logo'),
|
||||
'app_description' => config('site.description'),
|
||||
] : [];
|
||||
}
|
||||
|
||||
public static function assertSettingsWritable(array $settings): void
|
||||
{
|
||||
foreach (self::publicSettings() as $key => $value) {
|
||||
if (array_key_exists($key, $settings) && $settings[$key] !== $value) {
|
||||
throw ValidationException::withMessages([$key => 'hn 品牌与主题由 SITE_PROFILE / SITE_* 部署配置管理。']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -102,6 +102,6 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'),
|
||||
'prefix' => env('CACHE_PREFIX', (env('SITE_PROFILE', 'dpl') === 'hn' ? 'hn_cache' : Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache')),
|
||||
|
||||
];
|
||||
+1
-1
@@ -132,7 +132,7 @@ return [
|
||||
|
||||
'options' => [
|
||||
'cluster' => env('REDIS_CLUSTER', 'redis'),
|
||||
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'),
|
||||
'prefix' => env('REDIS_PREFIX', (env('SITE_PROFILE', 'dpl') === 'hn' ? 'hn_database_' : Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_')),
|
||||
],
|
||||
|
||||
'default' => [
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ return [
|
||||
|
||||
'prefix' => env(
|
||||
'HORIZON_PREFIX',
|
||||
Str::slug(env('APP_NAME', 'laravel'), '_') . '_horizon:'
|
||||
(env('SITE_PROFILE', 'dpl') === 'hn' ? 'hn_horizon:' : Str::slug(env('APP_NAME', 'laravel'), '_') . '_horizon:')
|
||||
),
|
||||
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
return [
|
||||
'enabled' => env('PAYMENT_HEALTH_ENABLED', true),
|
||||
'auto_toggle' => env('PAYMENT_HEALTH_AUTO_TOGGLE', true),
|
||||
'timezone' => 'Asia/Shanghai',
|
||||
'site_label' => env('PAYMENT_HEALTH_SITE_LABEL'),
|
||||
'amount_cents' => 3200,
|
||||
'daily_probe_limit' => 8,
|
||||
'soft_failure_threshold' => 2,
|
||||
'state_path' => storage_path('app/private/payment-health/state.json'),
|
||||
// Gateway entry points stay pinned; HTTPS handoffs returned by them may be dynamic.
|
||||
'dynamic_handoffs' => env('PAYMENT_HEALTH_DYNAMIC_HANDOFFS', true),
|
||||
'allowed_hosts' => array_values(array_filter(array_map('trim', explode(',', env('PAYMENT_HEALTH_ALLOWED_HOSTS', 'pay.airspay.top,q.orltjrp.cn,api.shangri-la.vc'))))),
|
||||
'excluded_ids' => array_values(array_filter(array_map('intval', explode(',', env('PAYMENT_HEALTH_EXCLUDED_IDS', ''))))),
|
||||
'telehub_url' => env('PAYMENT_HEALTH_TELEHUB_URL', 'https://telehub.gemcook.net'),
|
||||
'telehub_key' => env('PAYMENT_HEALTH_TELEHUB_KEY', ''),
|
||||
];
|
||||
+1
-1
@@ -126,7 +126,7 @@ return [
|
||||
|
||||
'cookie' => env(
|
||||
'SESSION_COOKIE',
|
||||
Str::slug(env('APP_NAME', 'laravel'), '_') . '_session'
|
||||
(env('SITE_PROFILE', 'dpl') === 'hn' ? 'hn_session' : Str::slug(env('APP_NAME', 'laravel'), '_') . '_session')
|
||||
),
|
||||
|
||||
/*
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
$profile = env('SITE_PROFILE', 'dpl');
|
||||
if (!in_array($profile, ['dpl', 'hn'], true)) {
|
||||
throw new InvalidArgumentException('SITE_PROFILE must be dpl or hn.');
|
||||
}
|
||||
|
||||
$theme = env('SITE_THEME', 'EZ');
|
||||
if ($profile === 'hn' && !in_array($theme, ['Hardnerd', 'EZ'], true)) {
|
||||
throw new InvalidArgumentException('hn SITE_THEME must be Hardnerd or EZ.');
|
||||
}
|
||||
|
||||
return [
|
||||
'profile' => $profile,
|
||||
'theme' => $theme,
|
||||
'name' => env('SITE_NAME', 'hardnerd'),
|
||||
'full_name' => env('SITE_FULL_NAME', 'hardnerd.net'),
|
||||
'logo' => env('SITE_LOGO', '/brand/hn/logo.svg'),
|
||||
'description' => env('SITE_DESCRIPTION', 'hardnerd · 探索全球网络'),
|
||||
];
|
||||
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"articles": [
|
||||
{
|
||||
"id": 1,
|
||||
"language": "zh-CN",
|
||||
"category": "入门指南",
|
||||
"title": "新手指引",
|
||||
"body": "<div class=\"hn-start-guide\">\n<style>\n.doc-body .hn-start-guide { --start-muted:var(--text-muted,#a5adb5); --start-border:var(--border-color,#394047); --start-accent:var(--theme-color,#a3cc4b); display:flex; flex-direction:column; gap:14px; max-width:900px; margin:0 auto; font-size:16px; font-weight:400; line-height:1.75; letter-spacing:normal; word-spacing:normal; color:var(--text-color); }\n.doc-body .hn-start-guide > * { flex:none; margin:0; }\n.doc-body .hn-start-guide p { margin:0; line-height:inherit; }\n.doc-body .hn-start-guide p:empty { display:none; }\n.doc-body .hn-start-guide h2 { margin:18px 0 0; padding:0; border:0; font-size:21px; line-height:1.45; font-weight:600; }\n.doc-body .hn-start-guide .start-intro { font-size:17px; }\n.doc-body .hn-start-guide .start-muted { font-size:14px; color:var(--start-muted); }\n.doc-body .hn-start-guide strong { font-weight:600; }\n.doc-body .hn-start-guide .device-links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:28px; row-gap:0; margin:0; padding:0; }\n.doc-body .hn-start-guide .device-link { display:flex; align-items:center; justify-content:space-between; gap:16px; min-width:0; padding:15px 4px; margin:0; border-bottom:1px solid var(--start-border); color:var(--text-color); text-decoration:none; cursor:pointer; }\n.doc-body .hn-start-guide .device-copy { display:flex; flex-direction:column; gap:3px; min-width:0; }\n.doc-body .hn-start-guide .device-copy strong { font-size:17px; line-height:1.5; }\n.doc-body .hn-start-guide .device-copy small { display:block; color:var(--start-muted); font-size:13px; line-height:1.6; }\n.doc-body .hn-start-guide .device-arrow { flex:none; color:var(--start-accent); font-size:20px; }\n.doc-body .hn-start-guide .device-link:hover { color:var(--start-accent); background:rgba(127,127,127,.045); }\n.doc-body .hn-start-guide a:focus-visible { outline:2px solid var(--start-accent); outline-offset:4px; border-radius:3px; }\n.doc-body .hn-start-guide .start-steps { display:flex; flex-direction:column; gap:10px; list-style:none; padding:0; margin:0; }\n.doc-body .hn-start-guide .start-steps > li { display:flex; align-items:baseline; gap:12px; position:static; padding:0; margin:0; list-style:none; line-height:1.75; }\n.doc-body .hn-start-guide .step-number { flex:none; width:24px; color:var(--start-accent); font-size:13px; font-weight:600; }\n.doc-body .hn-start-guide .start-help { display:flex; flex-direction:column; gap:10px; margin-top:10px; padding-top:22px; border-top:1px solid var(--start-border); }\n.doc-body .hn-start-guide .start-help h2 { margin:0; font-size:18px; }\n@media(max-width:600px) { .doc-body .hn-start-guide { font-size:15px; gap:12px; } .doc-body .hn-start-guide .device-links { grid-template-columns:1fr; } .doc-body .hn-start-guide h2 { font-size:20px; margin-top:16px; } }\n</style>\n<p class=\"start-intro\">第一次使用 hardnerd?选择你的设备,跟着图文教程完成安装和连接。</p>\n<p class=\"start-muted\">开始前,请先登录网站,在「仪表盘」确认套餐有效、剩余流量充足。</p>\n<h2>选择你的设备</h2>\n<nav class=\"device-links\" aria-label=\"各设备使用教程\">\n<a class=\"device-link\" href=\"/#/docs/3\"><span class=\"device-copy\"><strong>Windows</strong><small>Clash Verge Rev · Windows 10 / 11</small></span><span class=\"device-arrow\" aria-hidden=\"true\">→</span></a>\n<a class=\"device-link\" href=\"/#/docs/4\"><span class=\"device-copy\"><strong>Mac</strong><small>Clash Verge Rev · Apple 芯片 / Intel</small></span><span class=\"device-arrow\" aria-hidden=\"true\">→</span></a>\n<a class=\"device-link\" href=\"/#/docs/5\"><span class=\"device-copy\"><strong>Android</strong><small>FlClash · 安卓手机 / 平板</small></span><span class=\"device-arrow\" aria-hidden=\"true\">→</span></a>\n<a class=\"device-link\" href=\"/#/docs/6\"><span class=\"device-copy\"><strong>iPhone / iPad</strong><small>Hiddify · iOS / iPadOS</small></span><span class=\"device-arrow\" aria-hidden=\"true\">→</span></a>\n<a class=\"device-link\" href=\"/#/docs/7\"><span class=\"device-copy\"><strong>Linux</strong><small>Clash Verge Rev · Linux 桌面</small></span><span class=\"device-arrow\" aria-hidden=\"true\">→</span></a>\n<a class=\"device-link\" href=\"/#/docs/8\"><span class=\"device-copy\"><strong>路由器</strong><small>OpenClash · 兼容的 OpenWrt 固件</small></span><span class=\"device-arrow\" aria-hidden=\"true\">→</span></a>\n</nav>\n<p class=\"start-muted\">想用其他软件,或需要其他版本?前往<a href=\"/#/docs/2\">所有客户端</a>选择下载。路由器配置较复杂,初次使用建议先在手机或电脑上完成连接。</p>\n<h2>连接需要做什么?</h2>\n<ol class=\"start-steps\">\n<li><span class=\"step-number\" aria-hidden=\"true\">01</span><span><strong>安装客户端</strong> — 按对应教程下载并打开应用;已经安装的,可以从导入订阅开Line truncated
|
||||
"sort": 1,
|
||||
"show": 1
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"language": "zh-CN",
|
||||
"category": "客户端下载",
|
||||
"title": "所有客户端",
|
||||
"body": "这里汇总可获取的客户端,按你的设备选择相应版本。首次使用可先查看[新手指引](/#/docs/1)。\n\n| 客户端 | 适用设备 | 获取客户端 |\n| --- | --- | --- |\n| Clash Verge Rev | Windows / macOS / Linux | [选择版本下载](/brand/hn/all-clients.html#clash-verge-rev) |\n| FlClash | Windows / macOS / Linux / Android | [选择版本下载](/brand/hn/all-clients.html#flclash) |\n| v2rayN | Windows / macOS / Linux | [选择版本下载](/brand/hn/all-clients.html#v2rayn) |\n| v2rayNG | Android | [选择版本下载](/brand/hn/all-clients.html#v2rayng) |\n| Hiddify | Windows / macOS / Linux / Android / iPhone / iPad | [选择版本下载](/brand/hn/all-clients.html#hiddify) |\n| Clash Meta for Android | Android | [选择版本下载](/brand/hn/all-clients.html#clash-meta-android) |\n| Shadowrocket | iPhone / iPad | [App Store](https://apps.apple.com/us/app/shadowrocket/id932747118) |\n| Surge | iPhone / iPad | [App Store](https://apps.apple.com/us/app/surge-5/id1442620678) |\n| Quantumult X | iPhone / iPad | [App Store](https://apps.apple.com/us/app/quantumult-x/id1443988620) |\n| OpenClash | OpenWrt 路由器 | [选择版本与查看安装说明](/brand/hn/all-clients.html#openclash) |\n\n## 选择与安装\n\n- 电脑客户端按 Windows、macOS 或 Linux 选择;Mac 还需要区分 Intel 与 Apple 芯片。\n- Android 安装包需要匹配设备架构,多数较新设备使用 ARM64。\n- Shadowrocket、Surge、Quantumult X 通过 App Store 获取,是否收费以商店显示为准。\n- 本页收录不代表每款客户端支持所有节点协议。导入后没有可用节点时,请先核对客户端与订阅格式,或提交工单咨询。\n\n> 请勿向他人公开你的订阅链接。\n",
|
||||
"sort": 2,
|
||||
"show": 1
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"language": "zh-CN",
|
||||
"category": "使用教程",
|
||||
"title": "Windows 使用教程(Clash Verge Rev)",
|
||||
"body": "<div class=\"hn-first-use\">\n<style>\n/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */\n.doc-body .hn-first-use {\n --guide-accent:var(--theme-color,#a3cc4b);\n --guide-muted:var(--text-muted,#a5adb5);\n --guide-border:var(--border-color,#394047);\n display:flex; flex-direction:column; align-items:stretch; gap:14px;\n max-width:900px; margin:0 auto; color:var(--text-color);\n font-size:16px; font-weight:400; line-height:1.75;\n letter-spacing:normal; word-spacing:normal;\n}\n.doc-body .hn-first-use > * { flex:none; margin:0; }\n.doc-body .hn-first-use p:empty { display:none; }\n.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }\n.doc-body .hn-first-use .intro { font-size:17px; }\n.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }\n.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }\n.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }\n.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }\n.doc-body .hn-first-use strong { font-weight:600; }\n.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }\n.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }\n.doc-body .hn-first-use figure { width:100%; margin:0; }\n.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }\n.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }\n.doc-body .hn-first-use .compact { max-width:760px; }\n.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }\n.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }\n.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }\n.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }\n.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }\n.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }\n.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }\n.doc-body .hn-first-use .alternative > summary::before { content:\"\"; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }\n.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }\n.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }\n.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }\n.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }\n.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }\n.doc-body .hn-first-use .alternative figure { max-width:760px; }\n.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }\n.doc-body .hn-first-use .result strong { color:var(--text-color); }\n.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }\n.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }\n.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }\n.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }\n.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }\n.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }\n.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }\n.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }\n.doc-body .hn-first-use table { width:100%; borLine truncated
|
||||
"sort": 20,
|
||||
"show": 1
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"language": "zh-CN",
|
||||
"category": "使用教程",
|
||||
"title": "Mac 使用教程(Clash Verge Rev)",
|
||||
"body": "<div class=\"hn-first-use\">\n<style>\n/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */\n.doc-body .hn-first-use {\n --guide-accent:var(--theme-color,#a3cc4b);\n --guide-muted:var(--text-muted,#a5adb5);\n --guide-border:var(--border-color,#394047);\n display:flex; flex-direction:column; align-items:stretch; gap:14px;\n max-width:900px; margin:0 auto; color:var(--text-color);\n font-size:16px; font-weight:400; line-height:1.75;\n letter-spacing:normal; word-spacing:normal;\n}\n.doc-body .hn-first-use > * { flex:none; margin:0; }\n.doc-body .hn-first-use p:empty { display:none; }\n.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }\n.doc-body .hn-first-use .intro { font-size:17px; }\n.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }\n.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }\n.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }\n.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }\n.doc-body .hn-first-use strong { font-weight:600; }\n.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }\n.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }\n.doc-body .hn-first-use figure { width:100%; margin:0; }\n.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }\n.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }\n.doc-body .hn-first-use .compact { max-width:760px; }\n.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }\n.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }\n.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }\n.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }\n.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }\n.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }\n.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }\n.doc-body .hn-first-use .alternative > summary::before { content:\"\"; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }\n.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }\n.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }\n.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }\n.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }\n.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }\n.doc-body .hn-first-use .alternative figure { max-width:760px; }\n.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }\n.doc-body .hn-first-use .result strong { color:var(--text-color); }\n.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }\n.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }\n.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }\n.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }\n.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }\n.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }\n.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }\n.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }\n.doc-body .hn-first-use table { width:100%; borLine truncated
|
||||
"sort": 21,
|
||||
"show": 1
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"language": "zh-CN",
|
||||
"category": "使用教程",
|
||||
"title": "Android 使用教程(FlClash)",
|
||||
"body": "<div class=\"hn-first-use\">\n<style>\n/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */\n.doc-body .hn-first-use {\n --guide-accent:var(--theme-color,#a3cc4b);\n --guide-muted:var(--text-muted,#a5adb5);\n --guide-border:var(--border-color,#394047);\n display:flex; flex-direction:column; align-items:stretch; gap:14px;\n max-width:900px; margin:0 auto; color:var(--text-color);\n font-size:16px; font-weight:400; line-height:1.75;\n letter-spacing:normal; word-spacing:normal;\n}\n.doc-body .hn-first-use > * { flex:none; margin:0; }\n.doc-body .hn-first-use p:empty { display:none; }\n.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }\n.doc-body .hn-first-use .intro { font-size:17px; }\n.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }\n.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }\n.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }\n.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }\n.doc-body .hn-first-use strong { font-weight:600; }\n.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }\n.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }\n.doc-body .hn-first-use figure { width:100%; margin:0; }\n.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }\n.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }\n.doc-body .hn-first-use .compact { max-width:760px; }\n.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }\n.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }\n.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }\n.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }\n.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }\n.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }\n.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }\n.doc-body .hn-first-use .alternative > summary::before { content:\"\"; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }\n.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }\n.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }\n.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }\n.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }\n.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }\n.doc-body .hn-first-use .alternative figure { max-width:760px; }\n.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }\n.doc-body .hn-first-use .result strong { color:var(--text-color); }\n.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }\n.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }\n.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }\n.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }\n.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }\n.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }\n.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }\n.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }\n.doc-body .hn-first-use table { width:100%; borLine truncated
|
||||
"sort": 22,
|
||||
"show": 1
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"language": "zh-CN",
|
||||
"category": "使用教程",
|
||||
"title": "iPhone / iPad 使用教程(Hiddify)",
|
||||
"body": "<div class=\"hn-first-use\">\n<style>\n/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */\n.doc-body .hn-first-use {\n --guide-accent:var(--theme-color,#a3cc4b);\n --guide-muted:var(--text-muted,#a5adb5);\n --guide-border:var(--border-color,#394047);\n display:flex; flex-direction:column; align-items:stretch; gap:14px;\n max-width:900px; margin:0 auto; color:var(--text-color);\n font-size:16px; font-weight:400; line-height:1.75;\n letter-spacing:normal; word-spacing:normal;\n}\n.doc-body .hn-first-use > * { flex:none; margin:0; }\n.doc-body .hn-first-use p:empty { display:none; }\n.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }\n.doc-body .hn-first-use .intro { font-size:17px; }\n.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }\n.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }\n.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }\n.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }\n.doc-body .hn-first-use strong { font-weight:600; }\n.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }\n.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }\n.doc-body .hn-first-use figure { width:100%; margin:0; }\n.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }\n.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }\n.doc-body .hn-first-use .compact { max-width:760px; }\n.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }\n.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }\n.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }\n.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }\n.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }\n.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }\n.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }\n.doc-body .hn-first-use .alternative > summary::before { content:\"\"; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }\n.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }\n.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }\n.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }\n.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }\n.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }\n.doc-body .hn-first-use .alternative figure { max-width:760px; }\n.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }\n.doc-body .hn-first-use .result strong { color:var(--text-color); }\n.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }\n.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }\n.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }\n.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }\n.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }\n.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }\n.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }\n.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }\n.doc-body .hn-first-use table { width:100%; borLine truncated
|
||||
"sort": 23,
|
||||
"show": 1
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"language": "zh-CN",
|
||||
"category": "使用教程",
|
||||
"title": "Linux 使用教程(Clash Verge Rev)",
|
||||
"body": "<div class=\"hn-first-use\">\n<style>\n/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */\n.doc-body .hn-first-use {\n --guide-accent:var(--theme-color,#a3cc4b);\n --guide-muted:var(--text-muted,#a5adb5);\n --guide-border:var(--border-color,#394047);\n display:flex; flex-direction:column; align-items:stretch; gap:14px;\n max-width:900px; margin:0 auto; color:var(--text-color);\n font-size:16px; font-weight:400; line-height:1.75;\n letter-spacing:normal; word-spacing:normal;\n}\n.doc-body .hn-first-use > * { flex:none; margin:0; }\n.doc-body .hn-first-use p:empty { display:none; }\n.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }\n.doc-body .hn-first-use .intro { font-size:17px; }\n.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }\n.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }\n.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }\n.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }\n.doc-body .hn-first-use strong { font-weight:600; }\n.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }\n.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }\n.doc-body .hn-first-use figure { width:100%; margin:0; }\n.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }\n.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }\n.doc-body .hn-first-use .compact { max-width:760px; }\n.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }\n.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }\n.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }\n.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }\n.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }\n.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }\n.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }\n.doc-body .hn-first-use .alternative > summary::before { content:\"\"; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }\n.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }\n.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }\n.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }\n.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }\n.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }\n.doc-body .hn-first-use .alternative figure { max-width:760px; }\n.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }\n.doc-body .hn-first-use .result strong { color:var(--text-color); }\n.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }\n.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }\n.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }\n.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }\n.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }\n.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }\n.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }\n.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }\n.doc-body .hn-first-use table { width:100%; borLine truncated
|
||||
"sort": 24,
|
||||
"show": 1
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"language": "zh-CN",
|
||||
"category": "使用教程",
|
||||
"title": "路由器使用教程(OpenClash)",
|
||||
"body": "<div class=\"hn-first-use\">\n<style>\n/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */\n.doc-body .hn-first-use {\n --guide-accent:var(--theme-color,#a3cc4b);\n --guide-muted:var(--text-muted,#a5adb5);\n --guide-border:var(--border-color,#394047);\n display:flex; flex-direction:column; align-items:stretch; gap:14px;\n max-width:900px; margin:0 auto; color:var(--text-color);\n font-size:16px; font-weight:400; line-height:1.75;\n letter-spacing:normal; word-spacing:normal;\n}\n.doc-body .hn-first-use > * { flex:none; margin:0; }\n.doc-body .hn-first-use p:empty { display:none; }\n.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }\n.doc-body .hn-first-use .intro { font-size:17px; }\n.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }\n.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }\n.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }\n.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }\n.doc-body .hn-first-use strong { font-weight:600; }\n.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }\n.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }\n.doc-body .hn-first-use figure { width:100%; margin:0; }\n.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }\n.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }\n.doc-body .hn-first-use .compact { max-width:760px; }\n.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }\n.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }\n.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }\n.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }\n.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }\n.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }\n.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }\n.doc-body .hn-first-use .alternative > summary::before { content:\"\"; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }\n.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }\n.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }\n.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }\n.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }\n.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }\n.doc-body .hn-first-use .alternative figure { max-width:760px; }\n.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }\n.doc-body .hn-first-use .result strong { color:var(--text-color); }\n.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }\n.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }\n.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }\n.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }\n.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }\n.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }\n.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }\n.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }\n.doc-body .hn-first-use table { width:100%; borLine truncated
|
||||
"sort": 25,
|
||||
"show": 1
|
||||
}
|
||||
],
|
||||
"plans": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "标准套餐",
|
||||
"prices": {
|
||||
"monthly": 32,
|
||||
"quarterly": 90,
|
||||
"half_yearly": 175,
|
||||
"yearly": 336,
|
||||
"reset_traffic": 32
|
||||
},
|
||||
"transfer_enable": 220,
|
||||
"content": "<div class=\"hn-plan-features\" style=\"display:grid;gap:10px\"><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>每月流量:<strong>{{transfer}}GB</strong></span></div><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>流媒体解锁</span></div><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>AI解锁</span></div><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>IEPL国际专线</span></div></div>"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "专业套餐",
|
||||
"prices": {
|
||||
"monthly": 180,
|
||||
"quarterly": 506.25,
|
||||
"half_yearly": 984.38,
|
||||
"yearly": 1890,
|
||||
"reset_traffic": 180
|
||||
},
|
||||
"transfer_enable": 1240,
|
||||
"content": "<div class=\"hn-plan-features\" style=\"display:grid;gap:10px\"><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>每月流量:<strong>{{transfer}}GB</strong></span></div><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>流媒体解锁</span></div><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>AI解锁</span></div><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>IEPL国际专线</span></div></div>"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "一次性套餐",
|
||||
"prices": {
|
||||
"onetime": 150
|
||||
},
|
||||
"transfer_enable": 150,
|
||||
"content": "<div class=\"hn-plan-features\" style=\"display:grid;gap:10px\"><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>总流量:<strong>{{transfer}}GB</strong></span></div><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>流媒体解锁</span></div><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>AI解锁</span></div><div class=\"hn-plan-feature\" style=\"display:flex;align-items:center;gap:3px;line-height:1.5\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\" style=\"flex:0 0 16px;color:#a3cc4b\"><circle cx=\"8\" cy=\"8\" r=\"3.25\" stroke=\"currentColor\" stroke-width=\"1.4\"/></svg><span>IEPL国际专线</span></div></div>"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<div class="hn-first-use">
|
||||
<style>
|
||||
/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */
|
||||
.doc-body .hn-first-use {
|
||||
--guide-accent:var(--theme-color,#a3cc4b);
|
||||
--guide-muted:var(--text-muted,#a5adb5);
|
||||
--guide-border:var(--border-color,#394047);
|
||||
display:flex; flex-direction:column; align-items:stretch; gap:14px;
|
||||
max-width:900px; margin:0 auto; color:var(--text-color);
|
||||
font-size:16px; font-weight:400; line-height:1.75;
|
||||
letter-spacing:normal; word-spacing:normal;
|
||||
}
|
||||
.doc-body .hn-first-use > * { flex:none; margin:0; }
|
||||
.doc-body .hn-first-use p:empty { display:none; }
|
||||
.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }
|
||||
.doc-body .hn-first-use .intro { font-size:17px; }
|
||||
.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }
|
||||
.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }
|
||||
.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }
|
||||
.doc-body .hn-first-use strong { font-weight:600; }
|
||||
.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }
|
||||
.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }
|
||||
.doc-body .hn-first-use figure { width:100%; margin:0; }
|
||||
.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }
|
||||
.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .compact { max-width:760px; }
|
||||
.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }
|
||||
.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }
|
||||
.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
|
||||
.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }
|
||||
.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }
|
||||
.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }
|
||||
.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }
|
||||
.doc-body .hn-first-use .alternative > summary::before { content:""; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }
|
||||
.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }
|
||||
.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }
|
||||
.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }
|
||||
.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }
|
||||
.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }
|
||||
.doc-body .hn-first-use .alternative figure { max-width:760px; }
|
||||
.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .result strong { color:var(--text-color); }
|
||||
.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }
|
||||
.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }
|
||||
.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }
|
||||
.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }
|
||||
.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }
|
||||
.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }
|
||||
.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }
|
||||
.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }
|
||||
.doc-body .hn-first-use table { width:100%; border-collapse:collapse; font-size:14px; }
|
||||
.doc-body .hn-first-use th,.doc-body .hn-first-use td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--guide-border); }
|
||||
@media(max-width:600px) {
|
||||
.doc-body .hn-first-use { font-size:15px; gap:12px; }
|
||||
.doc-body .hn-first-use .intro { font-size:16px; }
|
||||
.doc-body .hn-first-use h2 { font-size:21px; margin-top:16px; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:8px; }
|
||||
}
|
||||
</style>
|
||||
<p class="intro">在安卓手机或平板上,使用 <strong>FlClash</strong> 连接 hardnerd。</p><p class="before">开始前,请在手机浏览器登录 hardnerd,确认套餐有效、流量充足。</p><h2>1. 下载并安装</h2><a class="download" href="https://downloads.gemcook.net/downloads/software/flclash/flclash-android-arm64.apk">下载 FlClash · Android ARM64</a><p class="">该版本适用于多数较新的安卓手机。下载完成后,在下载记录或文件管理器中打开 <strong>.apk</strong> 文件。</p><p class="">若系统提示不允许安装此来源的应用,按提示仅允许当前浏览器或文件管理器安装,然后返回安装包继续。安装完成后打开 FlClash。</p><p class="small">如需其他版本,请前往<a href="/#/docs/2">所有客户端</a>选择下载。</p><h2>2. 从网站导入订阅</h2><ol><li>回到 hardnerd <strong>仪表盘</strong>,点击<strong>导入订阅</strong>。</li><li>选择 <strong>Android</strong>,再点击 <strong>FlClash</strong>。</li><li>浏览器询问是否打开应用时,确认打开客户端;出现导入提示时按提示确认。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/android/import.png" width="65536" height="4292542531" loading="lazy" alt="网站上的操作位置:Android → FlClash。手机上排列可能不同。"><figcaption>网站上的操作位置:Android → FlClash。手机上排列可能不同。</figcaption></figure><p class="">导入后打开 FlClash 的<strong>配置</strong>页面,<strong>点选刚添加的配置</strong>。</p><details class="alternative"><summary>没有自动打开客户端?试试手动导入</summary><ol><li>在网站导入面板中点击<strong>复制订阅地址</strong>。</li><li>进入 FlClash 的<strong>配置 → +</strong>,选择<strong>从链接导入</strong>(部分版本显示 <strong>URL</strong>)。</li><li>粘贴完整地址,按提示提交或确认,然后选中新增配置。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/android/manual.svg" width="760" height="480" loading="lazy" alt="操作示意:复制地址 → 从链接导入 → 选中配置。"><figcaption>操作示意:复制地址 → 从链接导入 → 选中配置。</figcaption></figure></details><p class="small">订阅地址相当于你的个人连接凭据,请勿公开或分享给别人。</p><h2>3. 选择规则模式和线路</h2><ol><li>在 FlClash <strong>仪表盘</strong>中,将模式设为<strong>规则</strong>。</li><li>打开<strong>代理 / 代理组</strong>,选择一条可用线路,或选择订阅提供的自动选择组。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/android/route.svg" width="760" height="294" loading="lazy" alt="操作示意;实际代理组、线路名称以订阅为准。"><figcaption>操作示意;实际代理组、线路名称以订阅为准。</figcaption></figure><h2>4. 启动连接</h2><p class="">回到仪表盘,点击<strong>启动 / 播放按钮</strong>。首次连接会出现系统 VPN 请求,确认来自 FlClash 后点击<strong>确定 / 允许</strong>。</p><figure class="compact"><img src="/brand/hn/tutorials/android/connect.svg" width="760" height="344" loading="lazy" alt="操作示意:启动 → 允许 VPN → 浏览器检查。系统提示因手机品牌而异。"><figcaption>操作示意:启动 → 允许 VPN → 浏览器检查。系统提示因手机品牌而异。</figcaption></figure><p class="">连接后,用浏览器打开你需要的网站。停止使用时,回到 FlClash 点击<strong>停止 / 暂停</strong>。</p><section class="troubleshooting"><h2>遇到问题</h2><div class="qa"><h3>提示安装包不兼容</h3><p>前往<a href="/#/docs/2">所有客户端</a>,选择匹配设备架构的 Android 安装包。不要为重装直接卸载现有应用,以免丢失配置。</p></div><div class="qa"><h3>导入后看不到线路</h3><p>确认套餐有效、流量充足;更新订阅,并确认已选中刚导入的配置。</p></div><div class="qa"><h3>连接后打不开网页</h3><p>确认已允许 VPN 请求,先停止其他 VPN,再更换线路。</p></div><div class="qa"><h3>切到后台后断开</h3><p>检查手机是否限制 FlClash 后台运行;按需要允许它在后台运行,再重新连接。</p></div><div class="qa"><h3>仍然无法使用</h3><p>在网站仪表盘点击「工单支持」,说明卡在哪一步,并附上系统版本、客户端版本和报错截图。不要附上完整订阅地址。</p></div></section><a class="back" href="/#/docs/1">← 返回新手指引</a>
|
||||
</div>
|
||||
Vendored
+57
@@ -0,0 +1,57 @@
|
||||
/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */
|
||||
.doc-body .hn-first-use {
|
||||
--guide-accent:var(--theme-color,#a3cc4b);
|
||||
--guide-muted:var(--text-muted,#a5adb5);
|
||||
--guide-border:var(--border-color,#394047);
|
||||
display:flex; flex-direction:column; align-items:stretch; gap:14px;
|
||||
max-width:900px; margin:0 auto; color:var(--text-color);
|
||||
font-size:16px; font-weight:400; line-height:1.75;
|
||||
letter-spacing:normal; word-spacing:normal;
|
||||
}
|
||||
.doc-body .hn-first-use > * { flex:none; margin:0; }
|
||||
.doc-body .hn-first-use p:empty { display:none; }
|
||||
.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }
|
||||
.doc-body .hn-first-use .intro { font-size:17px; }
|
||||
.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }
|
||||
.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }
|
||||
.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }
|
||||
.doc-body .hn-first-use strong { font-weight:600; }
|
||||
.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }
|
||||
.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }
|
||||
.doc-body .hn-first-use figure { width:100%; margin:0; }
|
||||
.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }
|
||||
.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .compact { max-width:760px; }
|
||||
.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }
|
||||
.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }
|
||||
.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
|
||||
.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }
|
||||
.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }
|
||||
.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }
|
||||
.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }
|
||||
.doc-body .hn-first-use .alternative > summary::before { content:""; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }
|
||||
.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }
|
||||
.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }
|
||||
.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }
|
||||
.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }
|
||||
.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }
|
||||
.doc-body .hn-first-use .alternative figure { max-width:760px; }
|
||||
.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .result strong { color:var(--text-color); }
|
||||
.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }
|
||||
.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }
|
||||
.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }
|
||||
.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }
|
||||
.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }
|
||||
.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }
|
||||
.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }
|
||||
.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }
|
||||
.doc-body .hn-first-use table { width:100%; border-collapse:collapse; font-size:14px; }
|
||||
.doc-body .hn-first-use th,.doc-body .hn-first-use td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--guide-border); }
|
||||
@media(max-width:600px) {
|
||||
.doc-body .hn-first-use { font-size:15px; gap:12px; }
|
||||
.doc-body .hn-first-use .intro { font-size:16px; }
|
||||
.doc-body .hn-first-use h2 { font-size:21px; margin-top:16px; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:8px; }
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<div class="hn-start-guide">
|
||||
<style>
|
||||
.doc-body .hn-start-guide { --start-muted:var(--text-muted,#a5adb5); --start-border:var(--border-color,#394047); --start-accent:var(--theme-color,#a3cc4b); display:flex; flex-direction:column; gap:14px; max-width:900px; margin:0 auto; font-size:16px; font-weight:400; line-height:1.75; letter-spacing:normal; word-spacing:normal; color:var(--text-color); }
|
||||
.doc-body .hn-start-guide > * { flex:none; margin:0; }
|
||||
.doc-body .hn-start-guide p { margin:0; line-height:inherit; }
|
||||
.doc-body .hn-start-guide p:empty { display:none; }
|
||||
.doc-body .hn-start-guide h2 { margin:18px 0 0; padding:0; border:0; font-size:21px; line-height:1.45; font-weight:600; }
|
||||
.doc-body .hn-start-guide .start-intro { font-size:17px; }
|
||||
.doc-body .hn-start-guide .start-muted { font-size:14px; color:var(--start-muted); }
|
||||
.doc-body .hn-start-guide strong { font-weight:600; }
|
||||
.doc-body .hn-start-guide .device-links { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:28px; row-gap:0; margin:0; padding:0; }
|
||||
.doc-body .hn-start-guide .device-link { display:flex; align-items:center; justify-content:space-between; gap:16px; min-width:0; padding:15px 4px; margin:0; border-bottom:1px solid var(--start-border); color:var(--text-color); text-decoration:none; cursor:pointer; }
|
||||
.doc-body .hn-start-guide .device-copy { display:flex; flex-direction:column; gap:3px; min-width:0; }
|
||||
.doc-body .hn-start-guide .device-copy strong { font-size:17px; line-height:1.5; }
|
||||
.doc-body .hn-start-guide .device-copy small { display:block; color:var(--start-muted); font-size:13px; line-height:1.6; }
|
||||
.doc-body .hn-start-guide .device-arrow { flex:none; color:var(--start-accent); font-size:20px; }
|
||||
.doc-body .hn-start-guide .device-link:hover { color:var(--start-accent); background:rgba(127,127,127,.045); }
|
||||
.doc-body .hn-start-guide a:focus-visible { outline:2px solid var(--start-accent); outline-offset:4px; border-radius:3px; }
|
||||
.doc-body .hn-start-guide .start-steps { display:flex; flex-direction:column; gap:10px; list-style:none; padding:0; margin:0; }
|
||||
.doc-body .hn-start-guide .start-steps > li { display:flex; align-items:baseline; gap:12px; position:static; padding:0; margin:0; list-style:none; line-height:1.75; }
|
||||
.doc-body .hn-start-guide .step-number { flex:none; width:24px; color:var(--start-accent); font-size:13px; font-weight:600; }
|
||||
.doc-body .hn-start-guide .start-help { display:flex; flex-direction:column; gap:10px; margin-top:10px; padding-top:22px; border-top:1px solid var(--start-border); }
|
||||
.doc-body .hn-start-guide .start-help h2 { margin:0; font-size:18px; }
|
||||
@media(max-width:600px) { .doc-body .hn-start-guide { font-size:15px; gap:12px; } .doc-body .hn-start-guide .device-links { grid-template-columns:1fr; } .doc-body .hn-start-guide h2 { font-size:20px; margin-top:16px; } }
|
||||
</style>
|
||||
<p class="start-intro">第一次使用 hardnerd?选择你的设备,跟着图文教程完成安装和连接。</p>
|
||||
<p class="start-muted">开始前,请先登录网站,在「仪表盘」确认套餐有效、剩余流量充足。</p>
|
||||
<h2>选择你的设备</h2>
|
||||
<nav class="device-links" aria-label="各设备使用教程">
|
||||
<a class="device-link" href="/#/docs/3"><span class="device-copy"><strong>Windows</strong><small>Clash Verge Rev · Windows 10 / 11</small></span><span class="device-arrow" aria-hidden="true">→</span></a>
|
||||
<a class="device-link" href="/#/docs/4"><span class="device-copy"><strong>Mac</strong><small>Clash Verge Rev · Apple 芯片 / Intel</small></span><span class="device-arrow" aria-hidden="true">→</span></a>
|
||||
<a class="device-link" href="/#/docs/5"><span class="device-copy"><strong>Android</strong><small>FlClash · 安卓手机 / 平板</small></span><span class="device-arrow" aria-hidden="true">→</span></a>
|
||||
<a class="device-link" href="/#/docs/6"><span class="device-copy"><strong>iPhone / iPad</strong><small>Hiddify · iOS / iPadOS</small></span><span class="device-arrow" aria-hidden="true">→</span></a>
|
||||
<a class="device-link" href="/#/docs/7"><span class="device-copy"><strong>Linux</strong><small>Clash Verge Rev · Linux 桌面</small></span><span class="device-arrow" aria-hidden="true">→</span></a>
|
||||
<a class="device-link" href="/#/docs/8"><span class="device-copy"><strong>路由器</strong><small>OpenClash · 兼容的 OpenWrt 固件</small></span><span class="device-arrow" aria-hidden="true">→</span></a>
|
||||
</nav>
|
||||
<p class="start-muted">想用其他软件,或需要其他版本?前往<a href="/#/docs/2">所有客户端</a>选择下载。路由器配置较复杂,初次使用建议先在手机或电脑上完成连接。</p>
|
||||
<h2>连接需要做什么?</h2>
|
||||
<ol class="start-steps">
|
||||
<li><span class="step-number" aria-hidden="true">01</span><span><strong>安装客户端</strong> — 按对应教程下载并打开应用;已经安装的,可以从导入订阅开始。</span></li>
|
||||
<li><span class="step-number" aria-hidden="true">02</span><span><strong>导入订阅</strong> — 在网站「仪表盘 → 导入订阅」操作,将你的线路添加到客户端。</span></li>
|
||||
<li><span class="step-number" aria-hidden="true">03</span><span><strong>开启连接</strong> — 按教程开启系统代理或 VPN,再打开网页确认可以使用。</span></li>
|
||||
</ol>
|
||||
<p class="start-muted">只安装应用或导入订阅,还不算连接完成。订阅地址是你的个人连接凭据,请勿分享给别人。</p>
|
||||
<section class="start-help">
|
||||
<h2>卡在哪一步了?</h2>
|
||||
<p class="start-muted">先查看对应教程末尾的「遇到问题」。仍无法解决时,在「仪表盘 → 工单支持」告诉我们你的设备、客户端名称和卡住的步骤,并附上报错截图;截图中请遮住订阅地址。</p>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,62 @@
|
||||
<div class="hn-first-use">
|
||||
<style>
|
||||
/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */
|
||||
.doc-body .hn-first-use {
|
||||
--guide-accent:var(--theme-color,#a3cc4b);
|
||||
--guide-muted:var(--text-muted,#a5adb5);
|
||||
--guide-border:var(--border-color,#394047);
|
||||
display:flex; flex-direction:column; align-items:stretch; gap:14px;
|
||||
max-width:900px; margin:0 auto; color:var(--text-color);
|
||||
font-size:16px; font-weight:400; line-height:1.75;
|
||||
letter-spacing:normal; word-spacing:normal;
|
||||
}
|
||||
.doc-body .hn-first-use > * { flex:none; margin:0; }
|
||||
.doc-body .hn-first-use p:empty { display:none; }
|
||||
.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }
|
||||
.doc-body .hn-first-use .intro { font-size:17px; }
|
||||
.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }
|
||||
.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }
|
||||
.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }
|
||||
.doc-body .hn-first-use strong { font-weight:600; }
|
||||
.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }
|
||||
.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }
|
||||
.doc-body .hn-first-use figure { width:100%; margin:0; }
|
||||
.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }
|
||||
.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .compact { max-width:760px; }
|
||||
.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }
|
||||
.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }
|
||||
.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
|
||||
.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }
|
||||
.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }
|
||||
.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }
|
||||
.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }
|
||||
.doc-body .hn-first-use .alternative > summary::before { content:""; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }
|
||||
.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }
|
||||
.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }
|
||||
.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }
|
||||
.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }
|
||||
.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }
|
||||
.doc-body .hn-first-use .alternative figure { max-width:760px; }
|
||||
.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .result strong { color:var(--text-color); }
|
||||
.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }
|
||||
.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }
|
||||
.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }
|
||||
.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }
|
||||
.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }
|
||||
.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }
|
||||
.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }
|
||||
.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }
|
||||
.doc-body .hn-first-use table { width:100%; border-collapse:collapse; font-size:14px; }
|
||||
.doc-body .hn-first-use th,.doc-body .hn-first-use td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--guide-border); }
|
||||
@media(max-width:600px) {
|
||||
.doc-body .hn-first-use { font-size:15px; gap:12px; }
|
||||
.doc-body .hn-first-use .intro { font-size:16px; }
|
||||
.doc-body .hn-first-use h2 { font-size:21px; margin-top:16px; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:8px; }
|
||||
}
|
||||
</style>
|
||||
<p class="intro">在 iPhone 或 iPad 上,使用 <strong>Hiddify</strong> 连接 hardnerd。</p><p class="before">适用于 iOS / iPadOS 15.0 及以上。开始前,请登录 hardnerd,确认套餐有效、流量充足。</p><h2>1. 安装 Hiddify</h2><a class="download" href="https://apps.apple.com/us/app/hiddify-proxy-vpn/id6596777532">在 App Store 获取 Hiddify</a><p class="">在 App Store 确认应用名称为 <strong>Hiddify Proxy & VPN</strong>,开发者为 <strong>Holistic Resilience</strong>,点击获取并安装,然后打开应用。</p><p class="small">能否获取取决于 App Store 所在地区。若提示不可用,可在<a href="/#/docs/2">所有客户端</a>查看其他 iPhone / iPad 客户端;不同软件的操作步骤不完全相同。</p><h2>2. 从网站导入订阅</h2><ol><li>回到 hardnerd <strong>仪表盘</strong>,点击<strong>导入订阅</strong>。</li><li>选择 <strong>iOS</strong>,再点击 <strong>Hiddify</strong>。</li><li>浏览器询问是否打开应用时,确认打开客户端;出现导入提示时按提示确认。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/ios/import.png" width="65536" height="4292542531" loading="lazy" alt="网站上的操作位置:iOS → Hiddify。手机上排列可能不同。"><figcaption>网站上的操作位置:iOS → Hiddify。手机上排列可能不同。</figcaption></figure><p class="">返回 Hiddify 首页,确认刚添加的配置已被选中。</p><details class="alternative"><summary>没有自动打开应用?试试手动导入</summary><ol><li>在网站导入面板中点击<strong>复制订阅地址</strong>。</li><li>打开 Hiddify 首页,点击<strong>+ → 从剪贴板添加(Clipboard)</strong>;若系统询问是否允许粘贴,确认允许。</li><li>也可以选择<strong>手动添加(Manually)</strong>,填写名称、粘贴完整 URL,再点击添加或保存。添加后选中这份配置。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/ios/manual.svg" width="760" height="480" loading="lazy" alt="操作示意:可从剪贴板添加,也可填写 URL 手动添加。"><figcaption>操作示意:可从剪贴板添加,也可填写 URL 手动添加。</figcaption></figure></details><p class="small">订阅地址相当于你的个人连接凭据,请勿公开或分享给别人。</p><h2>3. 允许 VPN 并连接</h2><p class="">点击 Hiddify 首页的<strong>连接按钮</strong>。首次使用时,iOS 会请求添加 VPN 配置,点击<strong>允许</strong>并按系统提示完成身份验证。</p><figure class="compact"><img src="/brand/hn/tutorials/ios/connect.svg" width="760" height="344" loading="lazy" alt="操作示意:连接 → 允许添加 VPN 配置。"><figcaption>操作示意:连接 → 允许添加 VPN 配置。</figcaption></figure><p class="">显示<strong>已连接 / Connected</strong>后,打开浏览器访问需要的网站。停止使用时,回到 Hiddify 再点连接按钮断开。</p><h2>4. 按需切换线路</h2><p class="">连接后打开<strong>代理(Proxies)</strong>页面,使用自动选择,或点击一条可用线路。切换后再次打开网页,确认可用。</p><figure class="compact"><img src="/brand/hn/tutorials/ios/route.svg" width="760" height="309" loading="lazy" alt="操作示意:先连接,再打开代理页选择线路。"><figcaption>操作示意:先连接,再打开代理页选择线路。</figcaption></figure><section class="troubleshooting"><h2>遇到问题</h2><div class="qa"><h3>商店提示不能安装</h3><p>检查设备是否满足 iOS / iPadOS 15.0 或更新版本,并确认所在 App Store 地区提供该应用。</p></div><div class="qa"><h3>导入后看不到线路</h3><p>确认套餐有效、流量充足;更新订阅,并确认已选中刚导入的配置。</p></div><div class="qa"><h3>一直连接中,或网页打不开</h3><p>确认 VPN 配置已获允许;断开其他 VPN,更新当前配置,再换一条线路。</p></div><div class="qa"><h3>仍然无法使用</h3><p>在网站仪表盘点击「工单支持」,说明卡在哪一步,并附上系统版本、客户端版本和报错截图。不要附上完整订阅地址。</p></div></section><a class="back" href="/#/docs/1">← 返回新手指引</a>
|
||||
</div>
|
||||
@@ -0,0 +1,62 @@
|
||||
<div class="hn-first-use">
|
||||
<style>
|
||||
/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */
|
||||
.doc-body .hn-first-use {
|
||||
--guide-accent:var(--theme-color,#a3cc4b);
|
||||
--guide-muted:var(--text-muted,#a5adb5);
|
||||
--guide-border:var(--border-color,#394047);
|
||||
display:flex; flex-direction:column; align-items:stretch; gap:14px;
|
||||
max-width:900px; margin:0 auto; color:var(--text-color);
|
||||
font-size:16px; font-weight:400; line-height:1.75;
|
||||
letter-spacing:normal; word-spacing:normal;
|
||||
}
|
||||
.doc-body .hn-first-use > * { flex:none; margin:0; }
|
||||
.doc-body .hn-first-use p:empty { display:none; }
|
||||
.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }
|
||||
.doc-body .hn-first-use .intro { font-size:17px; }
|
||||
.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }
|
||||
.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }
|
||||
.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }
|
||||
.doc-body .hn-first-use strong { font-weight:600; }
|
||||
.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }
|
||||
.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }
|
||||
.doc-body .hn-first-use figure { width:100%; margin:0; }
|
||||
.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }
|
||||
.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .compact { max-width:760px; }
|
||||
.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }
|
||||
.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }
|
||||
.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
|
||||
.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }
|
||||
.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }
|
||||
.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }
|
||||
.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }
|
||||
.doc-body .hn-first-use .alternative > summary::before { content:""; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }
|
||||
.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }
|
||||
.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }
|
||||
.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }
|
||||
.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }
|
||||
.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }
|
||||
.doc-body .hn-first-use .alternative figure { max-width:760px; }
|
||||
.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .result strong { color:var(--text-color); }
|
||||
.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }
|
||||
.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }
|
||||
.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }
|
||||
.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }
|
||||
.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }
|
||||
.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }
|
||||
.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }
|
||||
.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }
|
||||
.doc-body .hn-first-use table { width:100%; border-collapse:collapse; font-size:14px; }
|
||||
.doc-body .hn-first-use th,.doc-body .hn-first-use td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--guide-border); }
|
||||
@media(max-width:600px) {
|
||||
.doc-body .hn-first-use { font-size:15px; gap:12px; }
|
||||
.doc-body .hn-first-use .intro { font-size:16px; }
|
||||
.doc-body .hn-first-use h2 { font-size:21px; margin-top:16px; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:8px; }
|
||||
}
|
||||
</style>
|
||||
<p class="intro">在 Linux 桌面上,使用 <strong>Clash Verge Rev</strong> 连接 hardnerd。</p><p class="before">适用于常见 DEB / RPM 桌面发行版,不适用于无桌面的服务器。开始前,请确认套餐有效、流量充足。</p><h2>1. 选择安装包并安装</h2><p class="">本文适用于<strong>带图形界面的 Linux 桌面</strong>。先按发行版选格式,再按处理器架构选版本。</p><a class="download" href="/#/docs/2">选择 Clash Verge Rev 安装包</a><p class="">进入「所有客户端」,找到 <strong>Clash Verge Rev → 选择版本下载</strong>,选择 Linux 下对应的 DEB 或 RPM。</p><figure class="compact"><img src="/brand/hn/tutorials/linux/install.svg" width="760" height="344" loading="lazy" alt="操作示意:安装包格式、处理器架构都需要匹配。"><figcaption>操作示意:安装包格式、处理器架构都需要匹配。</figcaption></figure><p class="">下载后,先尝试在文件管理器中双击安装包,按软件安装器提示完成安装。安装好后,从应用菜单打开 <strong>Clash Verge Rev</strong>。</p><details class="alternative"><summary>双击没有安装器?使用终端安装</summary><p class="">在安装包所在文件夹打开终端。下面的文件名是占位符,请替换成实际下载的文件名:</p><p class="">Ubuntu / Debian:</p><pre><code>sudo apt install ./实际下载的文件名.deb</code></pre><p class="">Fedora / RHEL 系:</p><pre><code>sudo dnf install ./实际下载的文件名.rpm</code></pre><p class="">只运行适合自己系统的一条命令。按提示输入系统密码并确认安装;输入密码时不显示字符属于正常现象。</p></details><h2>2. 复制地址并导入订阅</h2><ol><li>回到 hardnerd <strong>仪表盘 → 导入订阅</strong>,点击<strong>复制订阅地址</strong>。</li><li>打开客户端的<strong>订阅</strong>页,粘贴完整地址,点击<strong>导入</strong>。</li><li>找到新增的订阅卡片,<strong>点击选中它</strong>。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/shared/manual-import.svg" width="760" height="470" loading="lazy" alt="操作示意:复制地址 → 粘贴并导入 → 选中订阅。"><figcaption>操作示意:复制地址 → 粘贴并导入 → 选中订阅。</figcaption></figure><p class="small">订阅地址相当于你的个人连接凭据,请勿公开或分享给别人。</p><h2>3. 选择线路</h2><ol><li>打开客户端的<strong>代理</strong>页面,选择<strong>规则</strong>模式。</li><li>展开节点选择组,点击一条可用线路;若有<strong>自动选择</strong>,也可以选它。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/shared/select-route.svg" width="880" height="286" loading="lazy" alt="操作示意;实际组名和线路以你的订阅为准。"><figcaption>操作示意;实际组名和线路以你的订阅为准。</figcaption></figure><h2>4. 开启系统代理</h2><p class="">找到<strong>系统代理</strong>开关并打开,然后用浏览器访问你需要的网站。</p><figure class="compact"><img src="/brand/hn/tutorials/shared/enable-proxy.svg" width="880" height="213" loading="lazy" alt="操作示意:开启系统代理,再打开网页。不同版本的开关位置可能不同。"><figcaption>操作示意:开启系统代理,再打开网页。不同版本的开关位置可能不同。</figcaption></figure><p class=""><strong>网页能正常打开,就可以开始使用了。</strong></p><p class="small">使用期间保持客户端运行。用完后,先关闭系统代理,再退出客户端。</p><section class="troubleshooting"><h2>遇到问题</h2><div class="qa"><h3>安装提示缺少依赖或打不开应用</h3><p>确认安装包与发行版、架构匹配;通过系统软件包管理器处理依赖,不要强制忽略依赖安装。</p></div><div class="qa"><h3>导入后看不到线路</h3><p>确认套餐有效、流量充足;更新订阅,并确认已选中刚导入的配置。</p></div><div class="qa"><h3>开了系统代理,浏览器仍不走代理</h3><p>检查浏览器网络设置是否使用系统代理;部分桌面环境或应用不会读取系统代理。不要直接改成全局模式来代替检查。</p></div><div class="qa"><h3>仍然无法使用</h3><p>在网站仪表盘点击「工单支持」,说明卡在哪一步,并附上系统版本、客户端版本和报错截图。不要附上完整订阅地址。</p></div></section><a class="back" href="/#/docs/1">← 返回新手指引</a>
|
||||
</div>
|
||||
@@ -0,0 +1,62 @@
|
||||
<div class="hn-first-use">
|
||||
<style>
|
||||
/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */
|
||||
.doc-body .hn-first-use {
|
||||
--guide-accent:var(--theme-color,#a3cc4b);
|
||||
--guide-muted:var(--text-muted,#a5adb5);
|
||||
--guide-border:var(--border-color,#394047);
|
||||
display:flex; flex-direction:column; align-items:stretch; gap:14px;
|
||||
max-width:900px; margin:0 auto; color:var(--text-color);
|
||||
font-size:16px; font-weight:400; line-height:1.75;
|
||||
letter-spacing:normal; word-spacing:normal;
|
||||
}
|
||||
.doc-body .hn-first-use > * { flex:none; margin:0; }
|
||||
.doc-body .hn-first-use p:empty { display:none; }
|
||||
.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }
|
||||
.doc-body .hn-first-use .intro { font-size:17px; }
|
||||
.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }
|
||||
.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }
|
||||
.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }
|
||||
.doc-body .hn-first-use strong { font-weight:600; }
|
||||
.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }
|
||||
.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }
|
||||
.doc-body .hn-first-use figure { width:100%; margin:0; }
|
||||
.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }
|
||||
.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .compact { max-width:760px; }
|
||||
.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }
|
||||
.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }
|
||||
.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
|
||||
.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }
|
||||
.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }
|
||||
.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }
|
||||
.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }
|
||||
.doc-body .hn-first-use .alternative > summary::before { content:""; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }
|
||||
.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }
|
||||
.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }
|
||||
.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }
|
||||
.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }
|
||||
.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }
|
||||
.doc-body .hn-first-use .alternative figure { max-width:760px; }
|
||||
.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .result strong { color:var(--text-color); }
|
||||
.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }
|
||||
.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }
|
||||
.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }
|
||||
.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }
|
||||
.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }
|
||||
.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }
|
||||
.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }
|
||||
.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }
|
||||
.doc-body .hn-first-use table { width:100%; border-collapse:collapse; font-size:14px; }
|
||||
.doc-body .hn-first-use th,.doc-body .hn-first-use td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--guide-border); }
|
||||
@media(max-width:600px) {
|
||||
.doc-body .hn-first-use { font-size:15px; gap:12px; }
|
||||
.doc-body .hn-first-use .intro { font-size:16px; }
|
||||
.doc-body .hn-first-use h2 { font-size:21px; margin-top:16px; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:8px; }
|
||||
}
|
||||
</style>
|
||||
<p class="intro">使用 <strong>Clash Verge Rev</strong> 连接 hardnerd,按顺序完成下面四步。</p><p class="before">适用于 macOS 12 及以上。开始前,请登录 hardnerd,确认套餐有效、流量充足。</p><h2>1. 下载并安装</h2><p class="">先打开<strong>苹果菜单 → 关于本机</strong>:显示 Apple M 系列芯片选 Apple 版;显示 Intel 处理器选 Intel 版。</p><div class="downloads"><a class="download" href="https://downloads.gemcook.net/downloads/software/clash-verge-rev/clash-verge-rev-macos-arm64.dmg">下载 · Mac Apple 芯片</a><a class="download" href="https://downloads.gemcook.net/downloads/software/clash-verge-rev/clash-verge-rev-macos-x64.dmg">下载 · Mac Intel</a></div><p class="small">如需其他版本,请前往<a href="/#/docs/2">所有客户端</a>选择下载。</p><ol><li>双击下载的 <strong>.dmg</strong> 文件,将 Clash Verge 图标拖入 <strong>Applications(应用程序)</strong>。</li><li>复制完成后,从<strong>应用程序</strong>打开 Clash Verge Rev,让它保持运行。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/macos/install.svg" width="760" height="360" loading="lazy" alt="操作示意:选对芯片版本,把应用拖入 Applications 后再打开。"><figcaption>操作示意:选对芯片版本,把应用拖入 Applications 后再打开。</figcaption></figure><h2>2. 从网站导入订阅</h2><ol><li>回到 hardnerd <strong>仪表盘</strong>,点击<strong>导入订阅</strong>。</li><li>选择 <strong>MacOS</strong>,再点击 <strong>ClashVerge</strong>。</li><li>浏览器询问是否打开应用时,确认打开客户端;出现导入提示时按提示确认。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/macos/import.png" width="65536" height="4292542531" loading="lazy" alt="网站上的操作位置:MacOS → ClashVerge。"><figcaption>网站上的操作位置:MacOS → ClashVerge。</figcaption></figure><p class="">进入客户端的<strong>订阅</strong>页,找到新导入的订阅卡片,<strong>点击选中它</strong>。</p><details class="alternative"><summary>没有自动打开客户端?试试手动导入</summary><ol><li>在网站的导入面板中点击<strong>复制订阅地址</strong>。</li><li>打开客户端的<strong>订阅</strong>页,粘贴地址,点击<strong>导入</strong>。</li><li>出现订阅卡片后,<strong>点击选中它</strong>。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/shared/manual-import.svg" width="760" height="470" loading="lazy" alt="操作示意:复制地址 → 粘贴并导入 → 选中订阅。"><figcaption>操作示意:复制地址 → 粘贴并导入 → 选中订阅。</figcaption></figure></details><p class="small">订阅地址相当于你的个人连接凭据,请勿公开或分享给别人。</p><h2>3. 选择线路</h2><ol><li>打开客户端的<strong>代理</strong>页面,选择<strong>规则</strong>模式。</li><li>展开节点选择组,点击一条可用线路;若有<strong>自动选择</strong>,也可以选它。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/shared/select-route.svg" width="880" height="286" loading="lazy" alt="操作示意;实际组名和线路以你的订阅为准。"><figcaption>操作示意;实际组名和线路以你的订阅为准。</figcaption></figure><h2>4. 开启系统代理</h2><p class="">找到<strong>系统代理</strong>开关并打开,然后用浏览器访问你需要的网站。</p><figure class="compact"><img src="/brand/hn/tutorials/shared/enable-proxy.svg" width="880" height="213" loading="lazy" alt="操作示意:开启系统代理,再打开网页。不同版本的开关位置可能不同。"><figcaption>操作示意:开启系统代理,再打开网页。不同版本的开关位置可能不同。</figcaption></figure><p class=""><strong>网页能正常打开,就可以开始使用了。</strong></p><p class="small">使用期间保持客户端运行。用完后,先关闭系统代理,再退出客户端。</p><section class="troubleshooting"><h2>遇到问题</h2><div class="qa"><h3>安装后找不到应用</h3><p>确认已经把图标拖入「应用程序」,再从那里启动,不要一直在 DMG 安装窗口中运行。</p></div><div class="qa"><h3>导入后看不到线路</h3><p>确认套餐有效、流量充足;更新订阅,并确认已选中刚导入的配置。</p></div><div class="qa"><h3>网页仍然打不开</h3><p>确认系统代理已开启,再换一条线路。避免同时运行多个代理客户端。</p></div><div class="qa"><h3>仍然无法使用</h3><p>在网站仪表盘点击「工单支持」,说明卡在哪一步,并附上系统版本、客户端版本和报错截图。不要附上完整订阅地址。</p></div></section><a class="back" href="/#/docs/1">← 返回新手指引</a>
|
||||
</div>
|
||||
@@ -0,0 +1,62 @@
|
||||
<div class="hn-first-use">
|
||||
<style>
|
||||
/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */
|
||||
.doc-body .hn-first-use {
|
||||
--guide-accent:var(--theme-color,#a3cc4b);
|
||||
--guide-muted:var(--text-muted,#a5adb5);
|
||||
--guide-border:var(--border-color,#394047);
|
||||
display:flex; flex-direction:column; align-items:stretch; gap:14px;
|
||||
max-width:900px; margin:0 auto; color:var(--text-color);
|
||||
font-size:16px; font-weight:400; line-height:1.75;
|
||||
letter-spacing:normal; word-spacing:normal;
|
||||
}
|
||||
.doc-body .hn-first-use > * { flex:none; margin:0; }
|
||||
.doc-body .hn-first-use p:empty { display:none; }
|
||||
.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }
|
||||
.doc-body .hn-first-use .intro { font-size:17px; }
|
||||
.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }
|
||||
.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }
|
||||
.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }
|
||||
.doc-body .hn-first-use strong { font-weight:600; }
|
||||
.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }
|
||||
.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }
|
||||
.doc-body .hn-first-use figure { width:100%; margin:0; }
|
||||
.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }
|
||||
.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .compact { max-width:760px; }
|
||||
.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }
|
||||
.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }
|
||||
.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
|
||||
.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }
|
||||
.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }
|
||||
.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }
|
||||
.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }
|
||||
.doc-body .hn-first-use .alternative > summary::before { content:""; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }
|
||||
.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }
|
||||
.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }
|
||||
.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }
|
||||
.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }
|
||||
.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }
|
||||
.doc-body .hn-first-use .alternative figure { max-width:760px; }
|
||||
.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .result strong { color:var(--text-color); }
|
||||
.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }
|
||||
.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }
|
||||
.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }
|
||||
.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }
|
||||
.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }
|
||||
.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }
|
||||
.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }
|
||||
.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }
|
||||
.doc-body .hn-first-use table { width:100%; border-collapse:collapse; font-size:14px; }
|
||||
.doc-body .hn-first-use th,.doc-body .hn-first-use td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--guide-border); }
|
||||
@media(max-width:600px) {
|
||||
.doc-body .hn-first-use { font-size:15px; gap:12px; }
|
||||
.doc-body .hn-first-use .intro { font-size:16px; }
|
||||
.doc-body .hn-first-use h2 { font-size:21px; margin-top:16px; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:8px; }
|
||||
}
|
||||
</style>
|
||||
<p class="intro">在 OpenWrt 路由器上使用 <strong>OpenClash</strong>,让接入它的设备使用 hardnerd。</p><p class="before">适用于已运行 OpenWrt 或兼容固件的路由器,需要后台管理权限。本文不包含刷机;开始前,请确认套餐有效。</p><h2>1. 准备路由器和 OpenClash</h2><p class="">电脑连接路由器网络,登录路由器管理后台,先到<strong>系统 → 备份 / 升级</strong>保存当前配置备份。已安装 OpenClash 并准备好内核,可以直接看第 2 步。</p><a class="download" href="/#/docs/2">查看 OpenClash 安装入口</a><p class="">在「所有客户端」中找到 <strong>OpenClash</strong>,进入版本选择页。使用 opkg 的固件选 <strong>.ipk</strong>,使用 apk 的固件选 <strong>.apk</strong>;这里的 APK 是 OpenWrt 软件包,不是安卓安装包。</p><ol><li>在路由器的<strong>系统 → 软件包</strong>中更新列表,再上传并安装匹配固件的安装包;有内置插件商店时,也可以使用它的 OpenClash 安装入口。</li><li>刷新页面,打开<strong>服务 → OpenClash</strong>,在<strong>版本更新</strong>中准备与路由器架构匹配的 <strong>Meta / Mihomo 内核</strong>。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/router/install.svg" width="760" height="398" loading="lazy" alt="操作示意:先备份,再安装插件和内核。菜单位置随固件版本而异。"><figcaption>操作示意:先备份,再安装插件和内核。菜单位置随固件版本而异。</figcaption></figure><details class="alternative"><summary>安装时提示缺少依赖</summary><p class="">使用固件的软件包管理器安装缺失的依赖。插件与内核模块需要匹配固件和防火墙版本;具体依赖可在「所有客户端」的 OpenClash 入口查看安装说明。不要强制忽略依赖或覆盖系统库。</p></details><h2>2. 添加网站订阅</h2><p class="">回到 hardnerd <strong>仪表盘 → 导入订阅</strong>,点击<strong>复制订阅地址</strong>。</p><p class="">进入路由器的<strong>服务 → OpenClash → 配置订阅</strong>,添加订阅:</p><ol><li>名称填一个好认的名字,例如 <strong>hardnerd</strong>;订阅地址粘贴刚才复制的完整地址。</li><li>User-Agent 选 <strong>clash.meta / Clash</strong> 类型;关闭<strong>在线订阅转换</strong>,直接读取网站配置。</li><li>保存订阅并保持条目启用,再点击<strong>更新配置</strong>,等待下载完成。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/router/subscribe.svg" width="760" height="412" loading="lazy" alt="填写示意:粘贴完整地址,保存后更新配置。"><figcaption>填写示意:粘贴完整地址,保存后更新配置。</figcaption></figure><p class="small">订阅地址相当于你的个人连接凭据,请勿公开或分享给别人。</p><h2>3. 切换配置,启动并选择线路</h2><ol><li>在<strong>配置管理</strong>找到刚下载的配置,点击<strong>切换</strong>。</li><li>回到<strong>运行状态</strong>启用 OpenClash,等待插件和内核运行。</li><li>打开 OpenClash 的<strong>控制面板 → 代理</strong>,选择<strong>规则</strong>模式,再选择可用线路或自动选择组。</li></ol><figure class="compact"><img src="/brand/hn/tutorials/router/start.svg" width="760" height="351" loading="lazy" alt="操作示意:切换配置 → 启动插件 → 选择线路。"><figcaption>操作示意:切换配置 → 启动插件 → 选择线路。</figcaption></figure><h2>4. 让设备通过路由器上网</h2><p class=""><strong>作为主路由:</strong>手机、电脑连接这台路由器的 Wi-Fi 或 LAN,通常保持自动获取 IP、网关和 DNS。</p><p class=""><strong>作为旁路由:</strong>先用一台设备测试,让它的网关和 DNS 指向旁路由 LAN 地址。旁路由自身还需要正确的上游网关、转发与 NAT 配置,不能只安装插件。</p><figure class="compact"><img src="/brand/hn/tutorials/router/network.svg" width="760" height="374" loading="lazy" alt="连接示意:流量必须经过运行 OpenClash 的路由器。"><figcaption>连接示意:流量必须经过运行 OpenClash 的路由器。</figcaption></figure><p class="small">测试设备先停止其他 VPN 或代理客户端,再用浏览器打开需要的网站。保留设备原来的网关与 DNS;若启用后网络异常,先停用 OpenClash,并恢复原设置。</p><section class="troubleshooting"><h2>遇到问题</h2><div class="qa"><h3>后台没有 OpenClash 菜单</h3><p>刷新或重新登录后台,检查软件包与依赖是否安装成功。</p></div><div class="qa"><h3>内核不存在或无法启动</h3><p>到版本更新中确认内核已下载且架构匹配,再查看运行日志中的具体错误。</p></div><div class="qa"><h3>订阅更新失败</h3><p>重新复制完整地Line truncated
|
||||
</div>
|
||||
@@ -0,0 +1,99 @@
|
||||
<div class="hn-first-use">
|
||||
<style>
|
||||
/* Shared source, embedded in each HN article because the document renderer filters external stylesheets. */
|
||||
.doc-body .hn-first-use {
|
||||
--guide-accent:var(--theme-color,#a3cc4b);
|
||||
--guide-muted:var(--text-muted,#a5adb5);
|
||||
--guide-border:var(--border-color,#394047);
|
||||
display:flex; flex-direction:column; align-items:stretch; gap:14px;
|
||||
max-width:900px; margin:0 auto; color:var(--text-color);
|
||||
font-size:16px; font-weight:400; line-height:1.75;
|
||||
letter-spacing:normal; word-spacing:normal;
|
||||
}
|
||||
.doc-body .hn-first-use > * { flex:none; margin:0; }
|
||||
.doc-body .hn-first-use p:empty { display:none; }
|
||||
.doc-body .hn-first-use p { margin:0; line-height:inherit; letter-spacing:normal; }
|
||||
.doc-body .hn-first-use .intro { font-size:17px; }
|
||||
.doc-body .hn-first-use .before { color:var(--guide-muted); font-size:14px; }
|
||||
.doc-body .hn-first-use h2 { margin:18px 0 0; padding:0; border:0; font-size:23px; line-height:1.45; font-weight:600; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:10px; }
|
||||
.doc-body .hn-first-use h3 { margin:0; padding:0; border:0; font-size:15px; line-height:1.6; font-weight:600; }
|
||||
.doc-body .hn-first-use strong { font-weight:600; }
|
||||
.doc-body .hn-first-use ol { display:flex; flex-direction:column; gap:6px; margin:0; padding:0 0 0 24px; }
|
||||
.doc-body .hn-first-use ol > li { position:static; margin:0; padding:0 0 0 3px; line-height:1.75; list-style:decimal; }
|
||||
.doc-body .hn-first-use figure { width:100%; margin:0; }
|
||||
.doc-body .hn-first-use figure img { display:block; width:100%; height:auto; margin:0; padding:0; border:1px solid var(--guide-border); border-radius:7px; box-shadow:none; }
|
||||
.doc-body .hn-first-use figcaption { margin:8px 0 0; font-size:13px; line-height:1.6; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .compact { max-width:760px; }
|
||||
.doc-body .hn-first-use .download { display:inline-flex; align-items:center; align-self:flex-start; min-height:42px; padding:8px 17px; margin:0; border-radius:6px; background:rgba(var(--theme-color-rgb,163,204,75),.12); border:1px solid rgba(var(--theme-color-rgb,163,204,75),.24); color:var(--guide-accent); text-decoration:none; font-size:15px; line-height:1.6; font-weight:500; cursor:pointer; }
|
||||
.doc-body .hn-first-use .download:hover { background:rgba(var(--theme-color-rgb,163,204,75),.2); }
|
||||
.doc-body .hn-first-use .downloads { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
|
||||
.doc-body .hn-first-use .small { color:var(--guide-muted); font-size:13px; line-height:1.7; }
|
||||
.doc-body .hn-first-use .alternative { display:block; min-height:40px; margin:0; padding:0 0 0 14px; border-left:2px solid var(--guide-border); font-size:14px; line-height:1.8; }
|
||||
.doc-body .hn-first-use .alternative > summary { display:block; min-height:40px; margin:0; padding:7px 0; line-height:26px; list-style:none; cursor:pointer; font-size:14px; font-weight:500; color:var(--guide-muted); transition:color .15s ease; }
|
||||
.doc-body .hn-first-use .alternative > summary::-webkit-details-marker { display:none; }
|
||||
.doc-body .hn-first-use .alternative > summary::before { content:""; display:inline-block; width:6px; height:6px; margin:0 12px 2px 1px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(-45deg); transition:transform .15s ease; }
|
||||
.doc-body .hn-first-use .alternative[open] > summary::before { transform:rotate(45deg); }
|
||||
.doc-body .hn-first-use .alternative > summary:hover { color:var(--guide-accent); }
|
||||
.doc-body .hn-first-use .alternative > :not(summary) { margin:12px 0 0; }
|
||||
.doc-body .hn-first-use .alternative:not([open]) > :not(summary) { display:none; }
|
||||
.doc-body .hn-first-use .alternative[open] { padding-bottom:4px; }
|
||||
.doc-body .hn-first-use .alternative figure { max-width:760px; }
|
||||
.doc-body .hn-first-use .result { font-size:14px; color:var(--guide-muted); }
|
||||
.doc-body .hn-first-use .result strong { color:var(--text-color); }
|
||||
.doc-body .hn-first-use .troubleshooting { display:flex; flex-direction:column; gap:18px; margin-top:14px; padding-top:24px; border-top:1px solid var(--guide-border); }
|
||||
.doc-body .hn-first-use .troubleshooting h2 { margin:0; font-size:20px; }
|
||||
.doc-body .hn-first-use .qa { display:flex; flex-direction:column; gap:6px; margin:0; }
|
||||
.doc-body .hn-first-use .qa p { margin:0; color:var(--guide-muted); font-size:14px; line-height:1.75; }
|
||||
.doc-body .hn-first-use .back { display:inline-block; align-self:flex-start; padding:6px 0; margin:0; font-size:14px; }
|
||||
.doc-body .hn-first-use a:focus-visible, .doc-body .hn-first-use summary:focus-visible { outline:2px solid var(--guide-accent); outline-offset:4px; border-radius:3px; }
|
||||
.doc-body .hn-first-use code { font-size:.9em; overflow-wrap:anywhere; }
|
||||
.doc-body .hn-first-use pre { margin:0; padding:12px 16px; background:rgba(127,127,127,.08); border:1px solid var(--guide-border); border-radius:6px; overflow:auto; line-height:1.7; }
|
||||
.doc-body .hn-first-use table { width:100%; border-collapse:collapse; font-size:14px; }
|
||||
.doc-body .hn-first-use th,.doc-body .hn-first-use td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--guide-border); }
|
||||
@media(max-width:600px) {
|
||||
.doc-body .hn-first-use { font-size:15px; gap:12px; }
|
||||
.doc-body .hn-first-use .intro { font-size:16px; }
|
||||
.doc-body .hn-first-use h2 { font-size:21px; margin-top:16px; }
|
||||
.doc-body .hn-first-use h2:first-of-type { margin-top:8px; }
|
||||
}
|
||||
</style>
|
||||
<p class="intro">使用 <strong>Clash Verge Rev</strong> 连接 hardnerd,按顺序完成下面四步即可。</p>
|
||||
<p class="before">适用于 Windows 10 / 11。开始前,请登录 hardnerd,确认套餐未到期、流量未用完。</p>
|
||||
|
||||
<h2>1. 下载并安装</h2>
|
||||
<p>点击下面的按钮下载安装包,然后双击打开,按安装向导完成安装。</p>
|
||||
<a class="download" href="https://downloads.gemcook.net/downloads/software/clash-verge-rev/clash-verge-rev-windows-x64.exe">下载 Clash Verge Rev · Windows x64</a>
|
||||
<p>安装完成后,打开 <strong>Clash Verge Rev</strong>,让它保持运行。</p>
|
||||
<p class="small">上面的版本适用于常见 Intel / AMD 电脑。如需 Windows ARM 或其他版本,请前往<a href="/#/docs/2">所有客户端</a>选择下载。</p>
|
||||
|
||||
<h2>2. 从网站导入订阅</h2>
|
||||
<p>订阅会把你的线路配置添加到客户端,不需要手动填写服务器信息。</p>
|
||||
<ol><li>回到 hardnerd <strong>仪表盘</strong>,点击<strong>导入订阅</strong>。</li><li>选择 <strong>Windows</strong>,再点下方的 <strong>ClashVerge</strong>。</li><li>浏览器询问是否打开应用时,确认打开客户端;如出现导入提示,按提示确认。</li></ol>
|
||||
<figure><img src="/brand/hn/tutorials/windows/02-import.png" width="1112" height="502" alt="hardnerd 导入订阅面板:先选 Windows,再点击 ClashVerge"><figcaption>网站上的操作位置:Windows → ClashVerge。</figcaption></figure>
|
||||
<p>进入客户端的<strong>订阅</strong>页面,找到刚添加的订阅卡片,<strong>点击选中它</strong>。</p>
|
||||
<details class="alternative">
|
||||
<summary>没有自动打开客户端?试试手动导入</summary>
|
||||
<ol><li>在网站的导入面板中,点击<strong>复制订阅地址</strong>。</li><li>打开 Clash Verge Rev 的<strong>订阅</strong>页面,粘贴地址,点击<strong>导入</strong>。</li><li>出现新的订阅卡片后,<strong>点击选中它</strong>,再继续下方「选择线路」。</li></ol>
|
||||
<figure><img src="/brand/hn/tutorials/windows/manual-import.svg" width="760" height="470" loading="lazy" alt="手动导入三步示意:在网站复制订阅地址,在客户端订阅页粘贴并导入,最后点击选中新增订阅卡片"><figcaption>操作示意:复制地址 → 粘贴并导入 → 选中订阅。界面位置可能随版本变化。</figcaption></figure>
|
||||
</details>
|
||||
<p class="small">订阅地址相当于你的个人连接凭据,请勿公开或分享给别人。</p>
|
||||
|
||||
<h2>3. 选择线路</h2>
|
||||
<ol><li>在客户端打开<strong>代理</strong>页面,将模式设为<strong>规则</strong>。</li><li>展开节点选择组,点击一条可用线路。若有<strong>自动选择</strong>,也可以选它。</li></ol>
|
||||
<figure><img src="/brand/hn/tutorials/windows/select-route.svg" width="880" height="286" alt="操作示意:先选规则模式,再点击一条线路"><figcaption>图中线路仅作示例;实际组名和线路以你的订阅为准。</figcaption></figure>
|
||||
<p class="result"><strong>选好线路后,继续下一步。</strong> 只导入订阅和选择线路,还没有开启系统代理。</p>
|
||||
|
||||
<h2>4. 开启系统代理</h2>
|
||||
<p>在客户端找到<strong>系统代理</strong>开关并打开,通常在首页或设置中。然后打开浏览器,访问你需要的网站。</p>
|
||||
<figure><img src="/brand/hn/tutorials/windows/enable-proxy.svg" width="880" height="213" alt="操作示意:开启系统代理,再用浏览器打开网站"><figcaption>不同版本的开关位置可能不同,请认准「系统代理」。</figcaption></figure>
|
||||
<p><strong>网页能正常打开,就可以开始使用了。</strong></p>
|
||||
<p class="small">使用期间保持客户端运行。用完后,先关闭系统代理,再退出客户端。</p>
|
||||
|
||||
<section class="troubleshooting"><h2>遇到问题</h2>
|
||||
<div class="qa"><h3>导入后看不到线路</h3><p>确认套餐有效、流量充足;回到客户端的「订阅」页更新订阅,并选中订阅卡片。</p></div>
|
||||
<div class="qa"><h3>有线路,但网页打不开</h3><p>先检查系统代理是否开启,再换一条线路试试。不要同时运行多个代理客户端。</p></div>
|
||||
<div class="qa"><h3>仍然无法使用</h3><p>在网站仪表盘点击「工单支持」,说明卡在哪一步,并附上客户端版本和报错截图。不要附上完整订阅地址。</p></div>
|
||||
</section>
|
||||
<a class="back" href="/#/docs/1">← 返回新手指引</a>
|
||||
</div>
|
||||
@@ -10,6 +10,10 @@
|
||||
- 后台 Blade:resources/views/admin.blade.php;自定义后台扩展的源文件 resources/js/admin/ 与运行副本 public/admin-custom/ 必须一致。
|
||||
- 当前后台入口配置 secure_path=dove,通过 routes/web.php 使用,不是硬编码固定路由。后台 API 也使用这个配置。后台路径不是身份认证的替代。
|
||||
|
||||
## 多实例站点配置
|
||||
|
||||
`SITE_PROFILE` 默认 dpl 保留原有运行行为;hn 使用独立品牌与缓存/会话命名空间,2026-10-27 起默认 EZ,保留 Hardnerd 显式选项。实现、子模块、开发和发布边界见 [SITE_PROFILES](SITE_PROFILES.md)。部署实例须各用各的数据库、密钥、storage 和运行资源;参数不等于自动隔离错误复用的环境。当前纯前端设计预览另见 [THEME_DESIGNS](THEME_DESIGNS.md),不连接本后端。
|
||||
|
||||
## 主要业务入口
|
||||
|
||||
| 范围 | 入口 |
|
||||
|
||||
@@ -41,3 +41,7 @@ EPay 按空中支付 V1 文档签名(忽略 sign、sign_type 和空值,参
|
||||
## 管理员汇报渠道
|
||||
|
||||
用户于 2026-10-11 明确要求:工单与网站运行等管理员汇报不发送到管理员邮箱。当前此类管理员通知使用 Telegram;如存在或新增管理员邮件汇报,必须保留实现,通过独立开关控制,默认关闭,不通过删除代码实现关闭。工单回应邮件的收件人是提交工单的用户,不是管理员。管理员作为网站用户主动请求的验证码、登录邮件及原有用户业务邮件不因角色被一概拦截;人工群发规则继续按既有明确授权执行。
|
||||
|
||||
## XB全项目套餐流量取整
|
||||
|
||||
用户2026-10-29长期要求统一适用于HN及XB其他衍生项目;唯一规则正文见[XB套餐流量统一取整](/Users/hellcat/Documents/GemCodes/xb/docs/maintenance/BUSINESS_RULES.md#套餐流量统一取整xb全部衍生项目)。新建/调整套餐在原始比例计算结束后按10GB四舍五入,显示和实际配置一致;非已实现核心保存钩子,不自动追改用户已购额度。
|
||||
@@ -1,5 +1,7 @@
|
||||
# 发布与恢复
|
||||
|
||||
HN 已于2026-10-27独立部署,主站 hardnerd.net、后台 admin.hardnerd.net;版本、服务、备份与验收唯一正文见 [HN_PRODUCTION](HN_PRODUCTION.md)。以下原生产描述属于 DPL,不能套用到 HN。
|
||||
|
||||
## 目标与连接
|
||||
|
||||
本项目生产站点为 https://dp-link.net,后台 /dove;后端目录 /www/wwwroot/dp-link.net,服务器逻辑名 site-jp02。通过既定白色跳板连接;项目与连接入口参见 [dpl 档案](/Users/hellcat/Documents/CoDocs/10-项目/dpl.md) 和 [私有资源索引](/Users/hellcat/Documents/CoDocs/30-私有资源/README.md),不把它们的内容提交到公开仓库。
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# HN管理员专属套餐
|
||||
|
||||
2026-10-30用户明确批准本次核心方案:在HN工作树修改PlanService与用户套餐接口,仅HN按管理员套餐ID配置控制列表、单项访问和购买权限;不改数据库结构或DPL默认行为,先本地实现测试,不自动发布。
|
||||
|
||||
## 当前配置(本地及生产均已配置)
|
||||
|
||||
本地套餐ID4,名称管理员套餐,16元/月,110GB/月,仅月付。复制标准套餐的介绍、流量重置方式和其他限制,show=false/sell=true/renew=true;标准及其它套餐不改。私有设置hn_admin_only_plan_ids=[4],仅SITE_PROFILE=hn时生效。生产于2026-10-30按实际新ID4建立并登记;不是盲用本地ID。
|
||||
|
||||
PlanService.getAvailablePlans增加可选User参数;访客不传用户且不返回专属套餐,用户套餐接口用数据库中的当前用户角色。管理员可见并新购隐藏套餐;普通用户即便猜中ID、被误设show=true、曾持有该套餐或提交流量重置周期,均不能绕过。仍遵守停售、库存和续费开关。订单接口在调用现有PlanService.validatePurchase时执行同一权限校验,未改OrderController或支付逻辑。DPL忽略该HN设置,维持旧行为。
|
||||
|
||||
## 验收与恢复
|
||||
|
||||
6项隔离内存数据库权限测试覆盖列表/访客、单项访问、降权用户、实际订单控制器三种周期拒绝且订单0、管理员可购、停售/库存/续费限制及DPL默认回归。原站点隔离14项/31断言及HN现有配置测试通过。未创建订单、调用支付商或实际付款;未改当前账号套餐、管理员账号或权限。尚未发布线上,也未以管理员浏览器登录验收。
|
||||
|
||||
本地备份位于共享仓库codex/output/hn-admin-plan-20261030/local-before*.sqlite。首次CLI缺少Redis扩展导致事务回滚,使用现有扩展后成功创建;没有安装或更改PHP服务。先停售并保留管理员ID配置,使非管理员继续被拒绝;若最终移除设置/回退代码,必须确认没有后续用户/订单依赖,只隐藏本次套餐,不整库覆盖。当前代码与配置需成套发布,数据库增量必须以HN实例与实际ID守卫执行。既有content/hn/release-data.json仅维护此前3个公开套餐,不包含本专属计划,不要用旧3套餐脚本覆盖新增计划。
|
||||
|
||||
2026-10-30用户在指定支付提示最终文案后明确要求发布,本次授权包含已完成的管理员专属套餐核心方案。发布仅HN,生产套餐按实际新ID登记,备份、事务、权限正负验证及DPL保护按HN_PRODUCTION本轮记录执行。
|
||||
|
||||
|
||||
## 2026-10-30 已发布生产
|
||||
|
||||
本次核心方案已随c1aef98发布HN专用实例,生产按实际新ID登记配置,16元/月110GB/月;正式模型、管理员用户套餐控制器及普通用户购买拒绝已验证,已有套餐不变。公开游客接口另行验证不返回专属计划。无用户/订单或实付操作,DPL代码及业务配置保持;备份、精确收据和恢复以HN_PRODUCTION本轮记录为准,早期“仅本地”是实现阶段历史。
|
||||
@@ -0,0 +1,67 @@
|
||||
# HN 邮件与订阅网关
|
||||
|
||||
2026-10-27初始化,2026-10-28按用户要求将c2订阅域名迁至t34;所有凭据、数据库与运行实例独立,未向DPL发布。主站与后台见 [HN_PRODUCTION](HN_PRODUCTION.md)。本文是实现、验收和恢复的唯一正文。
|
||||
|
||||
## 域名与渠道
|
||||
|
||||
- `hardnerd.net` / `admin.hardnerd.net`:HN主站/后台,sitejp02。
|
||||
- `hardnerd.dev`:系统邮件域名,保留Namecheap BasicDNS和Private Email MX/SPF、privateemail DKIM。用户实际建立的是 `[email protected]`,保留其名称。
|
||||
- Resend:独立账号ACC-RESEND-HN,Tokyo,domain ID `db1cf9ac-3d57-41b5-9fd0-f567ab40b520`。`resend._domainkey` TXT、`rsend` CNAME到`rsend-apne1.forge.rmta.net`、`send` CNAME到`send.forge.rmta.net`均verified。Resend receiving关闭;企业收件走IMAP。
|
||||
- 邮箱:Namecheap Private Email Launch,订阅4476265,1/1邮箱、5GB;后台已显示服务有效至2027-10-27、自动续费开启,不代表将来扣款成功。
|
||||
- `hardnerd-nodes.com`:独立Cloudflare Free zone `1043df03492d50f87d92300a6729362e`,NS `bradley.ns.cloudflare.com` / `jewel.ns.cloudflare.com`,权威/公共解析及active状态已核实。root A与t34 A指向gateway-01,www CNAME根域,均橙云;原Namecheap转发MX/SPF保留,不作为HN业务邮箱。
|
||||
- 正式订阅基址 `https://t34.hardnerd-nodes.com` 已写入仅HN的 `subscribe_url`,生成链接主机已回读。root/www跳到hardnerd.net;t34只开放 `/s/<token>` 和 `/api/v1/client/subscribe`,其他路径404,不提供公开管理端。
|
||||
- Cloudflare完整(严格)在源站证书验证通过后保存;Cache Rule `d765537a713747faa2a6e9cd1009c8a9` 对所有请求绕过缓存。Bot Fight/Under Attack未开启,未关闭BIC或改账号安全设置。
|
||||
|
||||
## 2026-10-28 t34 域名迁移
|
||||
|
||||
用户明确将c2.hardnerd-nodes.com改为t34.hardnerd-nodes.com。新t34 A记录到相同gateway-01、橙云及自动TTL,旧c2记录已移除;不保留旧地址为正式订阅别名。HN subscribe_url已修改,生成链接主机回读t34。原全区缓存绕过和严格TLS保持,不改日志设置、认证、邮箱、DPL/FUC配置。
|
||||
|
||||
运维提交 `360c155fae5bbf86654fdcba1d0de33b80fb7de4` 先推送后部署;`scripts/hn/gateway/migrate-t34.py`分prepare/certificate/activate执行。新证书独立lineage t34,SAN=t34/root/www,有效至2027-01-26;宿主/容器证书路径、SNI、环回管理端模板和hn-gateway-cert.service已同步。仅重建HN两个容器以刷新只读挂载模板,保留原卷和管理员凭据;DPL/FUC四个原容器及Nginx哈希基线通过。旧c2证书只保留回退,不由现行专用timer续期。
|
||||
|
||||
经白色机实际测试:t34有效限时账号得到sing-box JSON和Clash YAML,invalid token403,非订阅/管理路径404,CF DYNAMIC、private/no-store及过滤头存在;源站证书校验、新lineage续期dry-run及专用HN reload hook均通过。QA用户ID4已禁用、额度清零、到期、令牌轮换、会话0。当前回读套餐0、节点1;节点来自既有/并行业务,本任务没有新增/改动节点,不把订阅格式验收写成节点联网验收。未做线上页面验收。
|
||||
|
||||
网关备份 `/root/codex-backups/hn-gateway/20261028-t34/` 保存本次保护基线、旧host/proxy/cert service、旧证书symlink和deployment metadata;HN应用设置备份 `/root/codex-backups/hn/20261028-t34/subscribe-before.json`。本次本地证据 `codex/output/hn-t34-20261028/`。回退先恢复旧c2橙云A记录及旧网关Git模板/备份vhost、proxy、证书symlink、专用service,nginx -t后仅重建HN容器并平滑reload,再恢复HN subscribe_url;保留新旧证书/卷和凭据,不用全局docker/Certbot操作,不重启DPL/FUC。
|
||||
|
||||
## HN 邮件运行配置
|
||||
|
||||
`/www/wwwroot/hardnerd.net/.env`、HN库的 `mail_flow` 设置;SMTP465 SSL与IMAP993 TLS均校验证书。旧Laravel读取 `MAIL_DRIVER`,已明确设smtp,不能只设MAIL_MAILER。发件名称hardnerd、地址及Reply-To均为自有邮箱,页脚主站hardnerd.net,空MAIL_LOGO_PATH避免沿用DPL图片。
|
||||
|
||||
验证码/登录链接/工单回复优先Resend,其他走企业SMTP;额度100/3000且使用官方用量与本地预占,规则沿 [BUSINESS_RULES](BUSINESS_RULES.md)。Resend密钥、IMAP密码与回调签名秘密在HN库加密;SMTP密码只在私有环境,未复制进普通后台可读设置。ACC-HN-MAIL与ACC-RESEND-HN私有字段按GemDocs读取,本文不存值。
|
||||
|
||||
Webhook `https://hardnerd.net/api/v1/guest/resend/webhook`,ID `dafe1822-894f-4aff-97c9-0dc669d416b8`,enabled;订阅sent/delivered/delivery_delayed/bounced/failed/complained/suppressed。未签名401,签名诊断200;真实测试sent和delivered均回调200,投递事件和时间已入库。
|
||||
|
||||
IMAP来信加密保存;来信自动回复启用,普通SMTP发送,按北京时间每天每发件人最多一次,既有过滤避免自身/退信/自动邮件循环。管理员运行汇报保持关闭,没有借用DPL master或Telegram目的地;HN尚无独立汇报路由,不能宣称已接入日报。外部普通来信自动回复未做额外真实发送验收。
|
||||
|
||||
只重启过HN的hn-fpm、hn-horizon;DPL邮件配置和工作进程未改。
|
||||
|
||||
## 独立网关
|
||||
|
||||
Git分支 `codex/hn-production`。首个网关安装器d8a5091,首启等待/安全续跑修复 `ad9a4fe5877f3f9741e79f8250257d707e768189`;后续文档提交以服务器HEAD为准。发布先推送后部署;原Git获取较慢最终成功,修复提交经已推送Git bundle导入,不使用源码打包覆盖。
|
||||
|
||||
- gateway-01 / VPS-006 -> `/opt/hn-gateway/provision`,实现 `scripts/hn/gateway/`,只经白色机SSH。
|
||||
- 本地代码:HN独立工作树相同目录下的scripts;本地Web域名不适用(运维容器);线上订阅域名见上;白色机网站反代未建立。
|
||||
- 容器 `hn-subscribe-gateway` / `hn-subscribe-admin`;宿主端口仅 `127.0.0.1:28080/28443/26444`。管理端只环回26444,无公网vhost。默认管理员按ACC-005建立,未改旧管理员。
|
||||
- 网络hn_sgw_net,172.28.32.0/24;卷hn_sgw_config / hn_sgw_logs;状态 `/var/lib/hn-sgw`,admin.env600。管理后端只指向hardnerd.net。白色机IP104.168.30.40为运维验收白名单,其他继承独立过滤库与管理规则。
|
||||
- gateway内存160MB/0.5CPU,admin128MB/0.5CPU;启动前可用内存538MB,端口/子网/磁盘/固定镜像均检查。既有DPL/FUC资源不停止、不复用HN卷。
|
||||
- 宿主 `/etc/nginx/conf.d/hn-subscribe.conf`、独立Cloudflare可信IP include与proxy include。宿主验证容器证书,容器验证HN上游证书,均不跳过TLS;已知域名SNI固定。
|
||||
- 初启镜像下载公开云IP列表再启动Nginx;安装器等待其初始化,失败后只允许相同凭据安全续跑,不重建身份或覆盖变更。
|
||||
- 独立证书SAN含t34/root/www,到2027-01-26;目录 `/etc/hn-gateway-letsencrypt`,ACME账户从同宿主既有已接受条款的账户复制到独立目录,未创建新账户或运行全局hooks。
|
||||
- hn-gateway-cert.timer专属续期,renew-gateway.sh仅重载两个HN容器和宿主Nginx;hn-gateway-cloudflare-ips.timer维护HN可信代理段。独立续期dry-run通过,未改DPL/FUC续期。
|
||||
|
||||
## 验收证据与边界
|
||||
|
||||
证据本地忽略目录 `codex/output/hn-mail-20261027/`;远端私有备份下保存配置/SQL/回调与测试收据,不能输出其中秘密。
|
||||
|
||||
- 两封SendEmailJob测试只发用户新建邮箱:Resend verification一封、conventional other一封;没有跨渠道重复发送。IMAP实收2封、SPF和DKIM均pass、HN正文/页脚正确、无DPL品牌;IMAP入库2封。Resend已投递且有时间;SMTP仅记submitted,真实收件另证,未伪造SMTP回执。
|
||||
- 白色机实际HTTPS请求:HN主站和DPL主站200,订阅root404;源站TLS校验通过。正式入口有效受限用户输出sing-box JSON与Clash YAML结构,invalid token403,管理路径404,no-store与过滤响应头存在。
|
||||
- 为保留审计同时避免令牌进入URL日志,真实有效令牌测试放GET JSON body,未持久改变原HN主站日志配置;非秘密invalid token验证了常规查询路径和短路径。没有对外展示或记录有效订阅URL。
|
||||
- 限时非管理员QA用户ID2,example.invalid、1MB/30分钟、无权限组/无节点;结束已禁用、额度清零、到期、令牌轮换且会话0,未删除审计证据。套餐/节点为空,未声称实际代理联网通过。
|
||||
- 四个原DPL/FUC容器ID、启动时间、重启次数与既有Nginx配置hash基线一致。HN主站外其他站点配置未改。未发布DPL功能代码。
|
||||
- sitejp02整机启动时间为2026-10-27 19:50:52,五个原服务在19:50:59至19:51:07随系统启动;与18:39首发保护基线的启动时间不同,不能写成未重启。重启原因本任务未核实,未执行重启命令;DPL HEAD/既有Nginx配置hash未变,原服务当前均active,DPL公网200。此项与gateway-01四个旧容器基线保持一致是两台服务器的不同结论。
|
||||
- 已完成服务器侧验收,未做线上页面验收。支付、真实节点联网及外部自动回复额外发送未验收。
|
||||
|
||||
## 备份与回退
|
||||
|
||||
邮件备份 `/root/codex-backups/hn/20261027-mail-setup/`:hn.sql、hn.env.before、applied.json、subscribe-url-before.json、邮件测试收据;resend-webhook.json含秘密只限root。恢复前先备份当前业务数据,不能用初次SQL覆盖后续运营数据。紧急停用HN mail_flow或恢复旧HN邮件环境/设置,仅重启HN FPM/Horizon;不要重置DPL或邮箱密码。回调可在HN Resend账号禁用,保留记录。
|
||||
|
||||
网关备份 `/root/codex-backups/hn-gateway/20261027-first-install/`:原容器/配置保护基线、HTTP-only vhost及证书日志。回退顺序:先恢复HN subscribe_url为原值,再只停HN两个timer及HN compose容器,将HN vhost恢复HTTP-only或退出,nginx -t后平滑reload;保留卷、证书、admin.env及备份。不得执行全局docker prune/down,不停旧容器、不撤销旧证书或重启共享服务。
|
||||
@@ -0,0 +1,65 @@
|
||||
# HN 支付配置与验收
|
||||
|
||||
2026-10-28 用户授权参考 DPL 配置 HN 支付,不影响 DPL;随后要求尽量完成无真实付款验收。
|
||||
|
||||
## 现行配置
|
||||
|
||||
- 仅生产 HN:sitejp02 `/www/wwwroot/hardnerd.net`、数据库 hn。安装并启用核心 epay 插件,未启用其他支付或功能插件。
|
||||
- 支付宝、微信支付两条 EPay 渠道,ID1/2,零固定/比例手续费;支付宝启用且已取得32元有效二维码收银页(未实付),微信因实际下游404关闭。网关 `https://pay.airspay.top`,商户参数服务器内从 DPL 现行渠道读取并一致性核验,未进入本地预览、日志、Git 或文档。
|
||||
- 共用 DPL 现有收款商户(资源 ACC-006 / SVC-PAY);不代表独立结算账户。HN 的渠道 UUID 重新生成,notify_domain 固定 `https://hardnerd.net`,返回订单页亦为 HN。两站数据库和订单独立;没有修改支付商全局设置或 DPL 渠道。
|
||||
- 只有数据库配置变更,没有业务代码变更、提交或部署;两站 HEAD 分别仍为 HN `39d7277f4bb5d0b044c2fa84fb4b34309eb3717a`、DPL `7e8fbf60bd62ed5c6093099d574e0f234994a088`。HN FPM/Horizon/Redis均active,无服务重启。
|
||||
|
||||
## 验收边界
|
||||
|
||||
1. 服务器真实模型和 checkout 控制器:事务内生成32元正式套餐QA订单,两个渠道签名独立复算通过,通知和返回主机均为 hardnerd.net。finally 回滚QA用户/订单;结束订单0。没有发送该支付URL到第三方。
|
||||
2. 服务器请求 HN 公开HTTPS回调:两个渠道均422拒绝无签名请求,说明可到达真实应用,未被挑战页替代。不是支付商发出的真实回调。
|
||||
3. 现有隔离测试8项/53断言通过:插件签名规则、金额/手续费、商户/渠道/成功状态、错误/缺失/结构化签名、取消与冲突交易号、真实控制器重复回调仅派发一次。
|
||||
4. 新增隔离完整业务链1项/43断言通过:支付宝/微信各自32元新购220GB/组2、完成状态、续费延长、流量重置、重复回调不重复延长、取消后不再开通。真实开通逻辑在SQLite内存数据库运行,仅虚构商户,禁止外部HTTP。第一次运行断言发现数据库配置把 :memory: 转为仓库路径,随后在迁移前显式强制内存配置,重跑通过;空测试文件已核实并清理,hn-preview.sqlite未变更。
|
||||
5. DPL v2_payment 全行(含私密配置)前后哈希一致;HN商户配置与参考一致,UUID均不同、回调仅HN。未修改DPL代码、配置、订单、用户、服务或第三方商户设置。
|
||||
|
||||
支付商查询API仅尝试POST(密钥在请求体),返回No Act;非敏感act=query放URL后仍以POST传凭据,返回商户ID不存在,说明该调用方式未获业务成功,不能据此判断商户无效或正常。自动审批拒绝把密钥置于GET URL的重试,未执行或绕过。
|
||||
|
||||
2026-10-28用户随后明确授权:支付宝/微信各一笔32元待支付测试单,不付款。两笔真实签名POST请求均已向空中支付提交,各返回HTTP200“正在为您跳转到支付页面,请稍候...”中间页,无初步错误标记。支付宝下一跳为q.orltjrp.cn收银页;微信为api.shangri-la.vc/submit.php自动POST表单。自动审批最初拒绝新下游转发,用户又明确授权仅访问这两个精确域名上的原两笔收银入口,不新增单、不付款,之后各跟随一次。
|
||||
|
||||
最终真实收银返回:支付宝HTTP200、标题“订单已超时”;微信HTTP404、标准404 Not Found(146字节)。因此不能把初始200写成最终出单成功,不能把超时页写成有效二维码收银验收。没有新增或重发原收银请求;没有扫码、付款确认或成功通知。微信下游已证实失效,仅关闭HN的wxpay渠道,支付宝保留启用;未调整DPL或共享商户的路由。支付宝当前可用二维码、真实到账/支付商成功回调仍未确认;微信须在支付商下游恢复并重新获授权验收后再启用HN,不因DPL同样显示开启就直接恢复。
|
||||
|
||||
本地QA均finally回滚,HN订单仍0;第三方可能保留待支付记录,本地回滚不能撤销。初次提交和下游访问各有持久日志/重复守卫,未知结果不盲重发。服务器私有备份目录含authorized-cashier.json、cashier-alipay.html、cashier-wxpay.html、cashier-follow.json、cashier-final-alipay.html、cashier-final-wxpay.html、hn-wx-before-disable.json;这些文件含私有订单参数,不展示、不进Git。DPL支付全行哈希仍一致;两站原HEAD不变、HN三服务active。
|
||||
|
||||
已完成上述服务器侧及隔离验收,未做线上页面验收。
|
||||
|
||||
## 备份与恢复
|
||||
|
||||
服务器 `/root/codex-backups/hn/20261028-pay/`,私有权限:hn-before.json(原HN支付/插件均空)、dpl-hash.txt、configured.json、safe-check.json、final.json。前后摘要与回读均不输出密钥。创建脚本为一次性空表守卫,禁止重跑覆盖现有渠道。
|
||||
|
||||
本地忽略证据 `codex/output/hn-pay-20261028/` 位于共享工作目录 `/Users/hellcat/Documents/GemCodes/xb`;脚本不含凭据值。紧急暂停收款只关闭 HN 两个 Payment 的enable;如需恢复空表,先确认无后续真实订单,再由受控事务按备份恢复HN支付/插件。不得恢复整库、改DPL或改共享商户设置。
|
||||
|
||||
## 继续排查的最终状态(2026-10-28)
|
||||
|
||||
用户要求继续配通、不影响DPL、不实际付款。本节覆盖上文早期“支付宝有效收银未确认”的历史状态。
|
||||
|
||||
### 已完成:支付宝无实付收银
|
||||
|
||||
新建支付宝/微信各一笔32元待支付QA请求后,在同一服务器脚本立即跟随已授权精确下游;支付宝4秒内HTTP200、标题“支付宝扫码支付”、实际二维码图片与32元金额均存在,没有“订单已超时”标记。初次超时在本轮快速链路未复现,不能把初次超时作为当前支付宝不可用结论。请求从HN真实checkout生成,签名复算及HN通知/返回主机已核验;二维码页采用上游自己的订单号,未把该上游号误当HN原订单号。
|
||||
|
||||
支付宝生产渠道继续启用,用户可见渠道仅“支付宝”。其公开通知按官方GET方式(不带商户/签名的空请求)亦422拒绝;前轮POST空请求拒绝和9项/96断言隔离开通测试保留。未扫码、未确认支付、未实际到账;真实成功通知未发生,隔离测试不等于真实回调。用户要求不实付,本项结果为收银与配置验收,不能描述为实际收款到账通过。
|
||||
|
||||
### 尚未完成:微信下游恢复
|
||||
|
||||
- 新测试单4秒内沿空中支付自动POST表单到api.shangri-la.vc/submit.php,仍HTTP404,标准Nginx146字节404页面。
|
||||
- 该下游空GET、空POST均可返回200“你还未配置支付接口商户!”;加入正常Referer/Origin亦不改变携带真实原订单参数后的404现象,单凭空请求200不能认定可收款。
|
||||
- 空中支付正式V1 mapi.php POST测试受理为code1、返回payurl;访问这个原同笔payurl得到相同自动表单,仍指向上述微信入口。不是HN缺少支付插件或商户签名未被网关接受;更换正式API没有提供另一个可用收银通道。
|
||||
- 支付商官方V1文档 https://pay.airspay.top/doc_old.html 现场读取,确认submit.php支持GET/POST且推荐POST,mapi.php使用POST,支付类型wxpay正确。文档中未找到按HN独立指定替代通道的参数;不擅自猜类型/路由。
|
||||
- 签名GET诊断最初被自动审批拒绝(URL日志/重放风险)。用户随后明确批准仅原微信测试单的收银参数/签名GET到api.shangri-la.vc,不含API密钥、不新增订单、不付款;只执行一次,仍HTTP404/146字节。由此未发现提交方式兼容性修复路径。商户API查询的密钥GET依然未执行。
|
||||
- 已用登记ACC-006的商户ID/密钥登录原支付商只读核对,MD5+RSA兼容模式仍为0;未改商户安全设置、资料、RSA、路由、通知或结算信息。没有找到可供HN独立改选的通道菜单。临时浏览器标签已关闭。
|
||||
|
||||
现行处理:HN微信保持enable=false,避免向客户显示失败入口;DPL渠道及共享商户路由不动。微信链路仍需支付服务商恢复当前下游,或提供经确认可用于HN的其他独立通道后再验收。本任务没有发送客服消息或替用户修改共享路由。
|
||||
|
||||
### 最终证据与回归
|
||||
|
||||
服务器私有新增目录 `/root/codex-backups/hn/20261028-pay-round2/` 保存新两笔请求/收银响应、journal.json、authorized-wx-get.json、final-state.json;`/root/codex-backups/hn/20261028-pay-mapi/` 保存正式POST API请求状态/响应及payurl检查。原目录保持。订单/二维码参数只在这些root私有文件,不能展示或提交Git。
|
||||
|
||||
本任务累计5次待支付创建请求(首轮2、快速跟随2、API1),未确认或执行付款;第三方可能保留记录,不重复提交未知结果。HN临时用户/订单全部finally事务回滚,结束订单0,微信enable仍false,月套餐32;没有给QA实际开通。两站HEAD不变;DPL支付全行哈希与最初基线一致,HN FPM/Horizon/Redis均active。没有业务代码变更、提交、推送、部署或服务重启。本轮已完成上述服务器侧验收,未做项目线上页面验收。
|
||||
|
||||
## 用户结项口径(2026-10-28)
|
||||
|
||||
用户明确“先视为对接完成”,支付对接事项按此结项,不再以微信未恢复阻塞后续套餐工作。技术事实保留:当前支付宝启用且32元二维码收银通过;微信关闭、未实付/未确认实际到账或真实成功通知。不因此启用失败通道或补写实付成功。
|
||||
@@ -0,0 +1,91 @@
|
||||
# HN 套餐配置
|
||||
|
||||
2026-10-28用户:个人套餐改为标准套餐,新增专业套餐200元,介绍逐项分行。本地和线上分别应用,均为HN独立数据库配置;没有改共享业务或EZ源码,无需代码发布。
|
||||
|
||||
## 当前套餐
|
||||
|
||||
| 套餐 | ID | 月付 | 季付 | 半年 | 年付 | 重置流量 | 一次性 | 流量额度 |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| 标准套餐 | 1 | 32 | 90 | 175 | 336 | 32 | — | 220GB/月 |
|
||||
| 专业套餐(本地) | 2 | 180 | 506.25 | 984.38 | 1890 | 180 | — | 1240GB/月 |
|
||||
| 专业套餐(线上上次确认) | 2 | 230 | 646.88 | 1257.81 | 2415 | 230 | — | 1582GB/月 |
|
||||
| 一次性套餐 | 3 | — | — | — | — | — | 150 | 总量150GB |
|
||||
|
||||
币种CNY,表内价格单位元。专业初始200元/1375GB,随后用户指定230元并同比调整;现价格按230/200=1.15倍,金额保留两位小数,流量理论1581.25GB因现有整数限制向上取1582GB。建议设备数沿用6(没有等比放大这个展示字段),实际speed_limit/device_limit仍null、不强制限制;这两项没有新增承诺。每月按购买日重置,长周期不会一次性乘流量。show/sell/renew开启;标准/专业不新增两年/三年/一次性周期,一次性套餐仅onetime周期。
|
||||
|
||||
生产组2(HN基础节点)和本地group_id=null保持各自原值,没有从线上复制节点/用户。标准套餐只改名及content,价格/流量不变;专业由标准复制非敏感套餐属性,改name/prices/transfer/sort。
|
||||
|
||||
## 当前介绍与HN图标
|
||||
|
||||
用户随后指定三项介绍:流媒体解锁、AI解锁、IEPL国际专线,勾选改为HN风格。当前三个套餐content统一HTML块布局:标准/专业首行每月流量及{{transfer}}GB,一次性首行总流量150GB;之后三项各一行,使用自绘SVG荧光绿(#a3cc4b)无框硬线勾选,流量行也加同款,每卡4枚。行间距10px,图标20px,无外部图片/字体/脚本,深浅主题继承原文字颜色。
|
||||
|
||||
展示设备建议和重置说明已按新文案从介绍移除,仅content和updated_at更新;display_device_limit=6、device_limit=null、价格/额度/周期/重置/销售/权限等其余字段保持原样。此处服务条目为用户明确指定的展示文案,本轮不代表流媒体/AI解锁或IEPL线路已接受现场能力验收。
|
||||
|
||||
本地与生产均已应用并核验非content字段完全一致,DPL套餐全行哈希不变。PlanResource模板替换无残留、每卡4个SVG通过,本地真实浏览器显示三项与自绘图标,截图codex/output/hn-plan-check-20261028/shop.png;新版图标仅保留加粗勾选路径;一次性保留总流量口径。线上完成配置/资源服务器侧回读,未做线上页面验收。生产备份/root/codex-backups/hn/20261028-plan-intro/,本地在线备份codex/output/hn-plan-intro-20261028/local-before.sqlite及应用收据。只改HN数据库介绍,无主题源码修改/代码发布要求,无用户/订单操作。
|
||||
|
||||
去框后版本已同步本地/生产并回读每卡4枚SVG,非content字段及DPL套餐哈希不变。此次独立恢复备份:生产`/root/codex-backups/hn/20261028-plan-check/`;本地`codex/output/hn-plan-check-20261028/local-before.sqlite`。
|
||||
|
||||
## 验收、备份与恢复
|
||||
|
||||
本地/生产模型验证PlanSave规则、四个购买周期、API金额3200/20000分、两个br且无残留模板变量均通过;同一事务更新,两边各自的用户/订单/节点数量前后不变。DPL套餐全表哈希前后一致。实际浏览器http://hn.loc/#/shop刷新后显示标准32和专业200及三行介绍,截图在共享仓库忽略目录codex/output/hn-plans-20261028/shop.png;没有下单。生产完成服务器侧验收,未做线上页面验收。
|
||||
|
||||
生产备份/root/codex-backups/hn/20261028-standard-pro/(HN v2_plan前SQL、DPL只读hash、applied.json);本地备份codex/output/hn-plans-20261028/local-before.sqlite,应用收据local-applied.json。初次严格数值比较float32与int32不等导致守卫拒绝,未写入;按只读基线复核后修正类型再执行。没有重置自增ID、清理其他数据或重启服务。专业后续有订单时不得盲目删套餐/整表恢复;停售优先只关闭HN对应show/sell,恢复先核实依赖及后续修改。
|
||||
|
||||
## 一次性套餐与重置包(2026-10-28后续)
|
||||
|
||||
用户新增要求150元/150GB,一次性。已在HN本地与生产各新增ID3,复制标准的节点组与显示设备建议6;prices仅onetime=150、reset_traffic_method=2(NEVER),不设置reset_traffic价格,不新增月付。介绍以br分三行:总流量150GB、建议6台、一次性流量用完即止不按月重置。既有标准/专业全行保持不变、DPL套餐全表哈希不变;没有创建订单或付款。
|
||||
|
||||
用户同时询问重置包玩法:现有重置清空已用上下行,恢复当前套餐原额度,不累计剩余,不延长到期。当前一次性默认不提供重置包;再购同款由OrderService.buyByOneTime重置用量、设置总额150GB、expired_at=null,剩余额不相加。例如原剩20GB,再购后可用150GB,而不是170GB。未为这次问答改重置业务代码。
|
||||
|
||||
本地/生产PlanSave、一次性购买可用性与PlanResource15000分、month/reset价格null、canResetTraffic=false及占位符/换行校验通过。http://hn.loc/#/shop实际已刷新,点击“一次性”分类只显示新套餐;截图codex/output/hn-onetime150-20261028/shop.png。线上服务器侧验收,未做线上页面验收。备份:生产/root/codex-backups/hn/20261028-onetime150/;本地codex/output/hn-onetime150-20261028/local-before.sqlite,均含应用收据。未修改代码、提交发布或重启服务。后续停售/回退同上,禁止有订单后盲删或整库恢复。
|
||||
|
||||
## 眼镜图标本地预览(2026-10-28)
|
||||
|
||||
用户要求“设计成眼镜看看,hnlogo参考”。仅本地HN三个套餐content替换为眼镜SVG,四行各一枚;参考public/brand/hn/logo.svg的切角镜片、镜桥和镜片短高光,沿用绿色。未发布线上,线上仍为无框勾选;DPL未改,非content字段一致。源SVG/脚本/本地SQLite恢复备份:共享仓库codex/output/hn-plan-glasses-20261028/。此预览不改变价格、额度或服务能力验收边界。
|
||||
|
||||
用户随后要求眼镜框:本地预览已改为镂空切角镜框,1.7px荧光绿描边和短镜桥,无填充/镜片高光;每卡仍4枚。源SVG、应用脚本、修改前SQLite备份及截图在共享仓库codex/output/hn-plan-glasses-frame-20261028/。仅本地预览,线上仍为无框勾选,DPL未修改。
|
||||
|
||||
眼镜框后续按用户要求压扁:镜片高度从8降为5,描边1.5px,宽度及切角保留;仅本地预览,线上仍为无框勾选。应用脚本、修改前备份及截图位于共享目录codex/output/hn-plan-glasses-flat-20261028/。
|
||||
|
||||
眼镜图标重新设计v2:用户反馈扁框无法识别,改为22px图标、较大方形圆底镜片、弧形鼻桥与两侧斜镜腿,保留绿色无填充描边;仅本地预览,非content字段一致,未改线上及DPL。源SVG、应用脚本、修改前SQLite备份与截图在共享目录codex/output/hn-plan-glasses-v2-20261028/。
|
||||
|
||||
用户要求方方呆呆、可带镜片:本地预览改为直角粗框、方形镜片、水平鼻桥和短镜腿,镜片18%绿色填充及短高光;22px图标。仅本地预览,线上未发布,非content字段一致、DPL未修改。应用脚本/SVG/修改前备份及截图:共享目录codex/output/hn-plan-glasses-square-20261028/。
|
||||
|
||||
用户再次要求参考logo:直接提取public/brand/hn/logo.svg的眼镜轮廓路径及镜桥/高光几何,平直上沿、外侧下切角,绿色粗框和22%镜片填充,图标24px;仅本地预览,线上仍为勾选,DPL未改。非content字段一致;脚本/SVG/修改前SQLite备份及截图在共享目录codex/output/hn-plan-glasses-logo-20261028/。
|
||||
|
||||
用户要求直接使用小图标版logo:本地套餐四行图标现为完整public/brand/hn/logo.svg的22px内嵌版本,保留深色圆角底、白色H和绿色眼镜,不再单独画眼镜。仅本地预览,线上仍为勾选、DPL未改,非content字段一致。可用SVG、应用脚本、修改前SQLite备份与截图位于共享目录codex/output/hn-plan-mini-logo-20261028/。
|
||||
|
||||
小尺寸标志重新设计:用户明确拒绝原logo直接缩小,现本地采用独立24单位网格的新图形,取消底板,以四段H竖笔加方正绿色眼镜横梁组成整体;2单位粗框、透色镜片,22px使用尺寸,H继承文字色以适配明暗主题。没有复用原logo路径。仅本地预览,线上仍为勾选,DPL未改,非content字段一致。源SVG/应用脚本/备份/截图:共享目录codex/output/hn-plan-icon-redesign-20261028/。
|
||||
|
||||
用户要求去掉H:已从本地小标志移除四段H竖笔,仅保留重设计版方框眼镜和淡色镜片,其余尺寸/间距不变。非content字段一致,仅本地预览,线上未发布、DPL未改。源SVG/脚本/修改前SQLite备份及截图:共享目录codex/output/hn-plan-glasses-only-20261028/。
|
||||
|
||||
用户要求增加眼镜腿:本地现有方框镜片两侧新增向外上方延伸的短镜腿,视框略加宽以避免裁切;每卡仍4枚,仅本地预览,线上未发布、DPL未改,非content字段一致。SVG/脚本/修改前SQLite备份及截图:共享目录codex/output/hn-plan-glasses-arms-20261028/。
|
||||
|
||||
眼镜预览追加单侧半截镜腿:右侧向后上方斜伸并带短横尾段,保留方框和淡色镜片,图标24px,以轻微透视增强辨识。仅HN本地套餐content,未改XB核心或线上/DPL,非content字段一致;源SVG/脚本/修改前SQLite备份及截图:共享目录codex/output/hn-plan-glasses-temple-20261028/。
|
||||
|
||||
眼镜透视重设计:用户说明无需限定一条镜腿,现本地预览改为整副轻微侧转,近侧镜片较高、远侧较短,上下沿倾斜并自然露出两侧不同长度镜腿;保留方正粗框/淡色镜片,24px。仅本地预览,线上及DPL未改、非content字段一致。源SVG/应用脚本/修改前SQLite备份及截图:共享目录codex/output/hn-plan-glasses-perspective-20261028/。
|
||||
|
||||
用户指定参照截图的空心圆点:本地套餐四行图标已替换为直径6.5px、1.4px描边的空心圆点(16px占位,颜色继承文字以适配明暗主题),取消眼镜图形。非content字段一致,仅本地预览,未发布线上或修改DPL/XB核心。源SVG/脚本/修改前SQLite备份及截图:共享目录codex/output/hn-plan-hollow-dot-20261028/。
|
||||
|
||||
用户要求空心圆点与主题协调:本地四行圆点改为HN主题绿色#a3cc4b,保持空心及尺寸;非content字段一致,仅本地预览,线上及DPL未改。脚本/修改前SQLite备份/截图:共享目录codex/output/hn-plan-green-dot-20261028/。
|
||||
|
||||
用户要求缩小圆点与文字间距:HN本地四行flex gap由9px改为3px,保留主题绿色空心圆点及行间距。仅本地预览,非content字段一致,线上及DPL未改;脚本/修改前SQLite备份/截图:共享目录codex/output/hn-plan-dot-gap-20261028/。
|
||||
|
||||
## 专业套餐230元调整(2026-10-28)
|
||||
|
||||
本地与线上HN专业ID2已同步230元/月、1582GB/月;季646.88、半年1257.81、年2415、重置230,其他周期键保留原值。只更新prices/transfer_enable/updated_at,介绍内容和其他字段保留各自版本(本地绿色圆点3px间距、线上无框勾选)。标准/一次性全行及DPL套餐哈希不变;既有用户/订单未操作,没有实付。模型资源月价23000分和流量模板1582GB回读通过,本地浏览器实际显示正确;已完成服务器侧验收,未做线上页面验收。生产备份/root/codex-backups/hn/20261028-pro230/含应用收据;本地脚本/备份/截图在共享目录codex/output/hn-pro230-20261028/。不改XB核心或发布代码。
|
||||
|
||||
## 专业套餐180元调整(2026-10-29,仅本地完成)
|
||||
|
||||
用户指定专业180元、同比调整流量。按原始200元/1375GB比例180/200=0.9,理论1237.5GB,整数额度向上取1238GB;避免从上次取整的1582GB重复换算造成累计偏差。季506.25、半年984.38、年1890、重置180,原始周期价格同比取两位。仅改专业prices/transfer_enable/updated_at,其他字段及标准/一次性全行保留。本地资源18000分/1238GB及实际浏览器显示通过;未改已有用户额度、订单、核心或DPL。
|
||||
|
||||
线上未完成:经白色机两次SSH均认证前关闭(Connection closed by 104.168.30.40 port22),远程脚本未执行,不声称上线。恢复后先核实HN专业当前值与/root/codex-backups/hn/20261029-pro180/是否存在再决定续跑,不盲重试;预备脚本有230/1582和各周期精确守卫、备份、其他HN套餐及DPL哈希校验。未改网络或直连业务机。共享目录codex/output/hn-pro180-20261029/含脚本、本地SQLite修改前备份与截图。
|
||||
|
||||
## 全XB统一取整补充(2026-10-29)
|
||||
|
||||
用户明确以后所有XB项目的套餐GB个位固定0、四舍五入到10GB。按最终1237.5GB原始比例结果取1240GB,本地专业ID2已1238→1240,180元与其他周期价及所有其他字段保持。以[XB唯一规则](/Users/hellcat/Documents/GemCodes/xb/docs/maintenance/BUSINESS_RULES.md#套餐流量统一取整xb全部衍生项目)为准。线上本轮仍因白色机认证前断开未执行,不能把本地1240或待同步180写为线上完成。脚本及本地套餐属性备份位于共享目录codex/output/xb-plan-round10-20261029/。未追改已有用户套餐权益、未改核心保存逻辑。
|
||||
|
||||
|
||||
## 2026-10-30 生产同步完成
|
||||
|
||||
近期发布已将专业180元/1240GB及三个套餐最终绿色空心圆点介绍同步生产;标准32元220GB、一次性150元150GB保持。保留生产节点组/设备限制等字段,未修改已有用户权益或订单。生产模型回读通过;备份、提交和回退唯一记录见HN_PRODUCTION本次发布节。此前SSH阻断为历史状态。
|
||||
@@ -0,0 +1,90 @@
|
||||
# HN 生产部署与恢复
|
||||
|
||||
2026-10-27 用户授权部署到 sitejp02,并指定主域名 hardnerd.net。本页仅维护 HN;DPL 发布仍单独授权。
|
||||
|
||||
## 当前实例
|
||||
|
||||
- 主站:https://hardnerd.net/;www.hardnerd.net 301 到主站。
|
||||
- 后台:https://admin.hardnerd.net/,根路径内部映射 HN 数据库内随机 secure_path;API 仍要求管理员认证。
|
||||
- 服务器:site-jp02 / VPS-005,路径 `/www/wwwroot/hardnerd.net`,经白色机 SSH;连接资料按 GemDocs 凭据入口取用,不写入仓库。
|
||||
- Git 发布分支:`codex/hn-production`;首发功能提交 `2e5cec6a05e4ba6bb4bad9ec814f8d099bcd2bfe`,合并当时本地 master;不是 DPL 的上线版本。后续邮件/订阅配置和安装器版本以本文及 [HN_MAIL_GATEWAY](HN_MAIL_GATEWAY.md) 为准;只更新HN专用分支。
|
||||
- EZ 锁定源码 `2c0581386d86006315e6eba2f5970c923892caba`;后台子模块 `ef5f43da335092cbff8fdf0ad7ff9b4d92d7d0d7`;两者均正常 Git 初始化,未修改第三方构建源。
|
||||
- `SITE_PROFILE=hn`、`SITE_THEME=EZ`、生产环境、debug 关闭、HTTPS 安全会话;独立 APP_KEY、数据库、SQL 用户、Redis 密码/前缀、storage、日志、会话与队列。未复制本地演示库或 DPL 业务数据。
|
||||
- MariaDB 数据库/账号 hn(仅 hn.* 授权),Redis `127.0.0.1:6387`;Unix 用户 hn。服务 `hn-redis`、`hn-fpm`、`hn-horizon`,独立 FPM socket `/run/php/hn.sock`、独立主配置 `/etc/php/8.4/hn-fpm.conf`(不向 DPL 共用 FPM 池加载)。
|
||||
- 新配置:`/etc/nginx/conf.d/hn.conf`、`/etc/hn/redis.conf`、`/etc/cron.d/hn-scheduler`,服务单元在 `/etc/systemd/system/`。HN FPM ondemand 最多2子进程,Horizon每组1进程,两个服务各 MemoryMax 640M,Redis上限128MB。
|
||||
- 生产默认管理员按 ACC-005 约定创建为 ID1,管理员有效且未禁用;未覆盖已有账号。凭据只由 GemDocs 对应字段入口提供,不写本文或日志。
|
||||
|
||||
## DNS 与 TLS
|
||||
|
||||
Namecheap 中 hardnerd.net 已切到 `bradley.ns.cloudflare.com` / `jewel.ns.cloudflare.com`;Cloudflare 独立 zone `76ae2997fe3ed41820aee0f7a73f4271`,免费方案已激活。根域与 admin A 指向 sitejp02,www CNAME 根域,均已代理;原5条 Namecheap 邮件 MX 与 SPF 已保留,不代表邮件收发可用。
|
||||
|
||||
源站 Let's Encrypt 证书含根域、www、admin,有效期至 2027-01-25;Certbot webroot `/var/lib/hn/acme`,HTTP 仅开放 ACME 并将其他请求跳到 HTTPS。证书目录 `/etc/letsencrypt/live/hardnerd.net`,已安装仅处理本证书的 `hn-cert-renew.timer` / `hn-cert-renew.service`,每日03:30加最多1小时随机延迟检查,Persistent补跑;续期后专用 deploy hook 检查并平滑 reload Nginx。续期 `certbot renew --cert-name hardnerd.net --dry-run` 已通过(退出0),timer下一次触发时间已回读。Cloudflare 完整(严格)已保存并回读;先通过源站证书验证,再启用严格校验,没有降低 TLS 校验。
|
||||
|
||||
未建立新的白色机网站反代;本机不访问线上。服务器侧运维请求走已登记 SSH 路线。hardnerd.dev 已配置独立企业邮箱与Resend;hardnerd-nodes.com 已配置独立订阅网关,运行、DNS、验收与恢复见 [HN_MAIL_GATEWAY](HN_MAIL_GATEWAY.md)。
|
||||
|
||||
## 发布、权限与恢复
|
||||
|
||||
按 Git 提交、推送,再在 HN 路径更新明确提交;保留 DPL 原 checkout 和分支。依赖安装与 EZ 构建在 HN 目录内完成,运行私密配置不进 Git。备份用 umask077,Git checkout 用022;仅 HN storage/bootstrap缓存允许 hn 写,源代码和发布资源由 root 管理。
|
||||
|
||||
首发备份:`/root/codex-backups/hn/20261027-first-deploy/`,包括 DPL/原Nginx/原服务保护基线、HN 初始环境600、建管理员前 HN SQL600、HTTP-only Nginx备份、安装/构建/Certbot日志及服务器验收JSON。目录受 root 保护;恢复前核实当前数据,不盲跑首发脚本。
|
||||
|
||||
紧急停止 HN:只停 hn-horizon、hn-fpm、hn-redis、hn-cert-renew.timer,保留数据库/配置/备份;如需撤销入口,将 hn.conf 恢复为该备份中的 HTTP-only 配置,nginx -t 后平滑 reload。不要重启/停止 DPL FPM、DPL Horizon、共享 MariaDB 或原 Redis。DNS 可按登记回滚 Namecheap BasicDNS,旧停放配置留作历史而不作业务恢复。
|
||||
|
||||
首发初始化曾因 Git 不跟踪 storage/app 空目录而中断;从守卫续跑点补齐目录后继续迁移,保留已生成密钥和独立数据库,没有重新初始化。HTTPS reload 后首次瞬时探测失败,复查及后续所有源站/公网 TLS 均通过;未因此放宽证书校验。
|
||||
|
||||
## 验收与业务范围
|
||||
|
||||
- 站点配置回归14测试/31断言、EZ配置测试1项、旧草稿测试7项及正式构建通过;合并后再验证,服务器依赖安装/构建和数据库迁移成功。
|
||||
- 经白色机在服务器侧验证:主站/后台 HTTPS200,www301,响应经 Cloudflare;公开配置 app_name=hardnerd,EZ主模块200,源站三个域名证书校验通过,.env访问403/404(www跳转后拒绝)。
|
||||
- 后台HTML及8项资源200,真实默认管理员登录200、管理配置接口200、访客403;仅本次新建验收令牌已撤销。
|
||||
- DPL HEAD `7e8fbf60bd62ed5c6093099d574e0f234994a088` 未变;全部原 Nginx 配置SHA256未变;DPL Horizon、共享FPM、Nginx主进程、MariaDB、原Redis均active且启动时间未变,DPL公网HTTP200。Nginx仅平滑加载新增HN虚拟主机。
|
||||
- 已完成服务器侧验收,未做线上页面验收。HN现为独立新站,没有套餐/订单/节点;邮件及辅助域名随后已配置并完成服务器侧收发/投递回调/订阅鉴权验收,详见 [HN_MAIL_GATEWAY](HN_MAIL_GATEWAY.md)。唯一受限订阅测试用户ID2已禁用、轮换令牌且无会话;支付及实际节点联网未配置/验收。
|
||||
|
||||
## 支付配置(2026-10-28)
|
||||
|
||||
HN 已按 DPL 现行商户参数配置支付宝/微信 EPay,独立UUID及HN通知/返回地址。配置与无实付服务器/隔离验收通过;后续快速未支付检查已取得支付宝32元有效二维码收银页(未实付);微信下游404,GET/POST及正式API路径均未找到修复,HN微信保持关闭。实际到账与支付商成功通知未验收。唯一正文和具体限制见 [HN_PAYMENT](HN_PAYMENT.md)。历史首发“支付未配置”只代表当时状态。
|
||||
|
||||
## 隐藏不可售周期:已发布(2026-10-28)
|
||||
|
||||
仅HN适配器过滤价格null周期,Git a8e7026457a71845b59843b16cc0bdd1b56700a6已推送HN专用分支并部署。标准/专业只显示月/季/半年/年,一次性只显示一次性;本地浏览器确认disabled标签0、季度90/月付32切换正常。实现见[HN_SHOP_PERIODS](HN_SHOP_PERIODS.md)。
|
||||
|
||||
生产原无Node/npm,本次在/opt/hn-build-tools/node-v22.19.0-linux-x64安装官方Node22.19.0并验证官方SHA256,HN依赖按锁文件安装,不改全局PATH或DPL。首次512MB JS堆构建失败,旧资源恢复;白色机SSH曾认证前关闭,恢复后继续经白色机执行,没有改网络或直连业务机。后续768MB JS堆、1GB cgroup、50%CPU构建成功,但发现theme/EZ/assets与public/theme/EZ/assets为独立目录,未同步公开目录导致新资源验收失败,保护逻辑恢复旧清单,未放宽站点安全策略。
|
||||
|
||||
最终通过独立候选目录构建,新增chunks同时复制到源码/公开assets目录,保留旧chunks供已有页面继续加载,最后原子切换两处manifest。成功收据/root/codex-backups/hn/20261028-hide-periods/applied.json已回读:新入口及Shop资源HTTP200且SHA256一致,HN主页引用新入口;hn-fpm/hn-horizon/hn-redis均active。DPL主页200、Git HEAD及EPay插件哈希未变;没有重启运行服务或修改数据库。
|
||||
|
||||
备份/root/codex-backups/hn/20261028-hide-periods/含assets-before、public-assets-before、候选产物、build4.log、runtime/before/applied收据和Git bundle。回滚前先核实当前版本;仅恢复HN旧manifest并保留其对应旧chunks,不操作DPL。已完成服务器侧验收,未做线上页面验收。本地截图和脚本在共享目录codex/output/hn-hide-periods-20261028/。
|
||||
|
||||
|
||||
## 近期HN变更统一发布(2026-10-30,已完成服务器侧验收)
|
||||
|
||||
用户明确授权近期HN更改全部发布。范围为HN独立适配器/欢迎组件、语言缩写与过渡、帮助卡片关闭扫光、教程正文和图片、客户端下载页面及三个套餐的最终展示/价格/流量(专业180元1240GB)。公开数据库发布源为content/hn/release-data.json,仅含文章与套餐,不含用户、订单、账号或环境设置。文章必须按生产实际ID重绑定;不覆盖已有不匹配文章。保护DPL代码、套餐、支付及用户订单数据,不向DPL发布。生产先备份、Git推送后部署明确提交,独立候选构建并双目录追加chunks后切manifest。完成状态及实际验收随后补记。
|
||||
|
||||
功能提交e9b0a68c0cb38dde5c8f10623b546937b4c0bbae已经白色机推送到codex/hn-production,再由Git bundle导入到sitejp02并快进更新。既有HN测试1项及本地隔离生产构建通过;服务器候选构建在1GB内存/50%CPU限制下完成,新增chunks分别追加到theme/EZ/assets与public/theme/EZ/assets,清单原子切换。线上新入口及欢迎组件资源哈希匹配,26项公开教程/下载素材HTTP200,HN主站引用新入口。
|
||||
|
||||
HN生产文章原为空,本轮事务按发布源明确设置ID1—8并校验所有站内文章目标;不是复制用户或重置自增序列。三个套餐仅更新名称/介绍/价格/流量,保留组、设备限制、有效期等字段。生产当前标准32元220GB/月、专业180元1240GB/月、一次性150元150GB总量,介绍为绿色空心圆点。用户42、订单0,未写用户或订单。DPL HEAD及EPay文件哈希、套餐/支付表摘要均与前置基线一致,主站服务器侧HTTP200。HN FPM/Horizon/Redis均active,无服务重启。
|
||||
|
||||
私有生产备份/root/codex-backups/hn/20261030-release/含HN套餐/文章SQL、business-before.json、两处旧资源、候选产物及before/business-applied/applied收据;本地脚本在共享仓库codex/output/hn-release-20261030/。恢复前检查后续编辑和订单:资源可仅恢复旧清单并保留旧chunks,业务只逐项恢复本次更改或隐藏本次文章,禁止整库回退或覆盖新增业务。已完成服务器侧验收,未做线上页面验收。
|
||||
|
||||
|
||||
## 订单确认弹窗与提示颜色发布(2026-10-30)
|
||||
|
||||
用户明确授权发布,功能提交ede1e1bdc47cb8aecf08a9144f93fa17cf45e532已推送codex/hn-production,经白色机在sitejp02 Git快进并发布。仅HN独立runtime-config关闭ORDER_CONFIG.confirmOrder并清空提示内容,保留正常结算页;独立适配器把普通Toast侧线、信息图标与进度条映射到--theme-color,保留错误和警告语义。无XB核心、共享EZ源码或DPL修改,其他聊天同期教程编辑未混入。
|
||||
|
||||
现有HN配置测试通过;线上独立候选构建通过,产物确认confirmOrder=false和主题色规则。新增chunks两目录追加、清单原子切换;入口及相关JS/CSS公开HTTP200且哈希一致,主站引用新入口。HN/DPL套餐、支付、文章表摘要与前置相同,DPL HEAD及EPay文件不变,DPL主站服务器侧200,HN三服务active,无重启、订单或付款。已完成服务器侧验收,未做线上页面验收。
|
||||
|
||||
备份/root/codex-backups/hn/20261030-ui/含before/applied收据、两处旧资源和候选产物;回退仅恢复旧清单并保留旧chunks,代码回退须先核对后续提交,不恢复数据库或操作DPL。脚本在共享仓库codex/output/hn-release-20261030/*-ui.py。
|
||||
|
||||
本次SSH中断后先回读候选构建成功、无applied收据且原发布进程退出,再从既有候选续跑,不重复构建或业务写入。CSS变量保留空格造成严格字符串断言拒绝,检查实际编译规则后改为验证完整语义等价规则;公开哈希、业务保护及最终成功收据均通过。未改网络或放宽TLS。
|
||||
|
||||
|
||||
## 管理员套餐与支付弹窗发布(2026-10-30)
|
||||
|
||||
用户先明确批准PlanService和用户套餐接口的具体核心方案,随后授权发布。功能提交c1aef986928f9d0eb048a39f6065b75e2215b079已推送HN专用分支并经白色机Git快进到sitejp02;未发布DPL。仅发布本次支付弹窗/文案与管理员权限,不包含其它聊天并行教程修改。
|
||||
|
||||
跳转型支付提示为用户指定“请在收银台扫描二维码完成支付”,按钮前往收银台,二维码型仍显示原扫码提示及真实二维码分支;外层透明无边框,内层单一圆角边框。候选构建与相关公开JS/CSS哈希匹配,新入口已启用。没有创建待支付单、访问收银台或实际付款。
|
||||
|
||||
生产按实际新ID建立管理员套餐(ID见私有applied收据),16元/月110GB/月、show=false/sell=true/renew=true,仅月付,继承标准套餐节点组/重置/限制;hn_admin_only_plan_ids仅HN启用。正式模型/控制器验证管理员列表和1600分价格、普通用户/游客不可见、普通用户猜ID/原持有者/三周期购买均拒绝;原有套餐逐行保持,未改用户或订单。HN原支付/文章摘要及DPL套餐/支付/文章、代码和EPay摘要保持,DPL主站200,HN三服务active。仅平滑reload hn-fpm加载核心变更,无DPL服务操作。
|
||||
|
||||
本地20项/49断言权限与站点回归、HN配置测试通过。生产构建与发布由独立systemd单元执行,不依赖SSH持续在线;成功收据/root/codex-backups/hn/20261030-admin-release/applied.json,配套hn-plan-settings-before.sql、两处旧资源、候选产物和日志均root私有。已完成服务器侧验收,未做线上页面验收。恢复优先停售管理员计划并保留其权限ID列表,避免普通用户绕过;资源仅恢复旧清单,不整库恢复。回退核心前核实新增计划及后续订单,不将旧核心与新配置混用。
|
||||
|
||||
生产专属计划ID4;真实公开游客套餐接口HTTP200,仅公开ID1/2/3,不含ID4。发布脚本首次在事务成功后误调用Setting私有flush导致缺失业务收据;已使用公开Cache接口清理并回读已存在计划,通过管理员控制器/普通用户负向验证补收据,再继续既有候选激活,未重复创建。失败日志及恢复证据保留,不能把第一次失败写成事务回滚。启动器本地等待超时未中断服务器systemd任务,未来调用已补--no-block。最终applied与guest-api收据通过。
|
||||
@@ -0,0 +1,11 @@
|
||||
# HN购买页周期显示
|
||||
|
||||
2026-10-28用户要求:套餐卡片里置灰的不可购买周期直接不显示。
|
||||
|
||||
仅在frontends/hn/vite.config.mjs的HN适配器中,对上游Shop.vue周期标签v-for数据过滤price===null;不修改锁定EZ源码或DPL主题/代码/数据。不改套餐价格、销售状态、周期定义或订单校验。
|
||||
|
||||
本地实际浏览器确认:标准与专业各只显示月付/季度/半年/一年,一次性只显示一次性,DOM中disabled周期标签0个。周期切换/分组正常,既有价格和介绍未变。截图在共享工作目录codex/output/hn-hide-periods-20261028/shop.png。
|
||||
|
||||
生产仅发布HN,Git提交/构建与验收收据在同任务忽略目录及服务器备份;部署完成记录由GemDocs HN项目档案维护。恢复时仅回退HN此适配器提交并重新构建,或从该次静态资源备份恢复;不变更DPL、数据库或共享EZ子仓库。
|
||||
|
||||
2026-10-28生产完成:提交a8e7026457a71845b59843b16cc0bdd1b56700a6,独立候选目录构建后同步theme/EZ/assets及public/theme/EZ/assets,保留旧chunks,原子切换manifest。服务器侧新入口/Shop资源200及哈希匹配,HN主页引用新入口,HN三服务active;DPL主页200、代码与EPay哈希不变。收据/root/codex-backups/hn/20261028-hide-periods/applied.json。未做线上页面验收。构建/重试及恢复细节见[HN生产](HN_PRODUCTION.md)。
|
||||
@@ -0,0 +1,75 @@
|
||||
# HN 新手指引与站内图文教程
|
||||
|
||||
2026-10-29 本地维护。用户明确范围为新手指引内的六个平台,不是《所有客户端》的每款软件。当前页面入口 `http://hn.loc/#/docs/1`;源码与本文以 HN 专用工作树为准。
|
||||
|
||||
## 内容与入口
|
||||
|
||||
| 本地ID | 标题 | 正文源 |
|
||||
| --- | --- | --- |
|
||||
| 1 | 新手指引 | `content/hn/tutorials/index.html` |
|
||||
| 2 | 所有客户端 | 本地 Knowledge;版本选择页 `public/brand/hn/all-clients.html` |
|
||||
| 3 | Windows 使用教程(Clash Verge Rev) | `content/hn/tutorials/windows.html` |
|
||||
| 4 | Mac 使用教程(Clash Verge Rev) | `content/hn/tutorials/macos.html` |
|
||||
| 5 | Android 使用教程(FlClash) | `content/hn/tutorials/android.html` |
|
||||
| 6 | iPhone / iPad 使用教程(Hiddify) | `content/hn/tutorials/ios.html` |
|
||||
| 7 | Linux 使用教程(Clash Verge Rev) | `content/hn/tutorials/linux.html` |
|
||||
| 8 | 路由器使用教程(OpenClash) | `content/hn/tutorials/router.html` |
|
||||
|
||||
五篇新正文均写入本地独立 SQLite `database/hn-preview.sqlite` 的 Knowledge,并把 ID1 的五项链接逐项替换为实际文章ID;保留Windows入口及正文。每篇4步主流程、常见问题、回新手指引链接;摘要、标题由站内文档框架承担。沿用Windows的`.hn-first-use`正文内嵌样式,避免外链CSS被过滤。手动导入及备用安装方法默认折叠,summary有pointer、悬停和键盘焦点反馈。FAQ保持可直接阅读。
|
||||
|
||||
Mac区分Apple芯片/Intel;Android说明APK来源安装许可、VPN启动与后台限制;iOS沿用Hiddify,说明商店地区与VPN授权;Linux区分DEB/RPM与架构,手动导入作主路径;OpenClash区分固件包管理器、订阅User-Agent、内核、主路由与旁路由。未把Windows的系统代理操作套用到手机,也未延用旧教程的Stellar入口名称。
|
||||
|
||||
主流程与手动导入均有图;当前新五篇分别引用5/4/4/4/4张图片,含折叠部分。HN当前导入面板已分别截图到 `public/brand/hn/tutorials/{macos,android,ios}/import.png`;没有点击复制地址、二维码或实际协议唤起,不含订阅凭据。客户端配图为原创SVG操作示意,正文图注明确标注,路径在各平台目录和`shared/`。图片不冒充实机截图。Windows素材与正文内容保留;`shared/`中的Verge通用图是HN专属素材副本。
|
||||
|
||||
## 下载关联
|
||||
|
||||
其他版本入口统一指向站内ID2。Mac和Android首选包沿用resource已登记固定地址,本次没有访问在线安装包。为使教程下载路径完整,ID2现有Hiddify行补充iPhone/iPad,选择页Hiddify区新增官方App Store入口;新增OpenClash行与选择页区块,明确为上游安装入口而非镜像包,不扩展resource采集器。此前9款/48镜像包核验记录仍为历史快照;当前目录增加OpenClash入口,镜像文件数未变。
|
||||
|
||||
旧的共享 `content/tutorials/*` 与 `/tutorials/*` 渲染/构建不改。本轮仅迁移新手指引调用方;没有改共享路由、XB核心或DPL。旧Windows HN独立页的跳转沿用前轮。
|
||||
|
||||
## 核对来源
|
||||
|
||||
除当前HN实际界面与既有资源选择页外,2026-10-29读取以下一手来源用于核对步骤;不把旧共享教程的标题/按钮直接当作当前事实:
|
||||
|
||||
- [Clash Verge安装](https://www.clashverge.dev/install.html):macOS 12、芯片、Linux格式与安装方法。
|
||||
- [Clash Verge快速入门](https://www.clashverge.dev/guide/quickstart.html)、[订阅导入](https://www.clashverge.dev/guide/profile.html):订阅、规则模式和系统代理。
|
||||
- [FlClash添加配置源码](https://github.com/chen08209/FlClash/blob/main/lib/views/profiles/add.dart)、[中文文案](https://github.com/chen08209/FlClash/blob/main/arb/intl_zh_CN.arb):当前「从链接导入」及旧版URL兼容叫法;本文没有固定某次发行版布局。
|
||||
- [Hiddify使用说明](https://hiddify.com/app/How-to-use-Hiddify-app/)、[App Store](https://apps.apple.com/us/app/hiddify-proxy-vpn/id6596777532):剪贴板/手动添加、连接后切线路、iOS/iPadOS 15要求和应用身份。
|
||||
- [OpenClash说明](https://github.com/vernesong/OpenClash)、[订阅编辑源码](https://github.com/vernesong/OpenClash/blob/master/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe-edit.lua):固件安装包、后台入口与配置订阅。
|
||||
|
||||
## 保存、发布与回退
|
||||
|
||||
写入与本次备份:`codex/output/hn-platform-guides-20261029/`。`before-docs.json`只备份修改前的ID1/ID2;`before-all-clients.html`为版本选择页修改前内容;`manifest.json`与`receipt.json`记录本轮五篇和实际分配ID。应用前核验本地HN/sqlite、每个旧链接唯一、文章不重名;事务保存五篇和关联后回读,正文与源一致。
|
||||
|
||||
未提交、推送或发布线上。文章数据不随Git部署;生产时先查询/创建文章,按实际ID绑定入口和跨文档链接,不假定生产ID与本地相同。未实际安装五个平台的客户端、未触发VPN/系统代理/路由器变更,未做真实订阅联网。页面和静态内容检查不等于客户端实机验证。
|
||||
|
||||
回退时先核对并行变更:仅隐藏本次新增的五篇、逐项恢复新手指引链接及本次新增的两个目录入口;不要整库覆盖,也不要覆盖Windows、其他文章或他人修改。正文源和素材按本次文件清单处理。
|
||||
|
||||
## 本地验收
|
||||
|
||||
源HTML与数据库正文一致;所有引用图片存在、SVG语法通过;所有备用details初始无open;教程正文没有旧品牌占位符与“官方发布页”下载引导。本地浏览器已逐页打开ID4—8,确认标题、四步内容、初始折叠、点击展开、每张配图加载与无横向溢出;懒加载图片在展开并滚动进入视野后核验。ID1六入口显示正确,实际点击Mac入口进入ID4;路由器下载入口实际进入ID2,OpenClash行显示在同一表格,点击进入版本选择页对应区块;选择页Hiddify的iOS商店入口已显示。未点击下载包、商店安装或协议唤起。五页截图在聊天outputs/hn-platform-guides/,目录页截图index.png。GemDocs档案已关联本专题,check_docs离线检查通过。
|
||||
|
||||
|
||||
## 首轮折叠后文字重叠修复(2026-10-29,间距已由下节取代)
|
||||
|
||||
用户在右侧实际打开的Android页复现:关闭的details实际高度为0,summary为40px;下方规则模式的两条列表项top相同,段落和标题间距也失去布局占位。此前仅展开态截图及横向溢出检查不足以发现本问题;该验收结论不覆盖此缺陷。
|
||||
|
||||
六篇HN正文均补充局部文档流样式:根容器用纵向flex、子块不压缩;有序列表用纵向布局和固定gap,去除相对定位;summary改为普通块布局并保留最小点击高度,关闭时显式隐藏其余直属内容。保留默认折叠、鼠标指针和键盘焦点。未修改共享渲染器或XB核心;样式仍只作用于`.hn-first-use`。不把浏览器高度异常归因到未核实的特定浏览器版本。
|
||||
|
||||
六份修改前正文在`codex/output/hn-tutorial-layout-20261029/*.before.html`;修复脚本同目录,核对源与数据库逐篇一致后事务保存。Android用户当前页已刷新、反复展开/收起后summary占44px,正文与列表没有几何交叠;截图`outputs/hn-platform-guides/android-layout-fixed.png`。其余五篇已逐页检查初始折叠、点击展开、Enter收起三种状态:正文相邻块、列表项、FAQ均未检测到几何交叠,关闭details均保留44px高度,无横向溢出。Android重复开关两次通过。回读数据见备份目录browser-checks.json。仅本地修复,未发布线上。
|
||||
|
||||
|
||||
## 当前间距规范与新手指引(2026-10-29)
|
||||
|
||||
上一轮修复占位时保留了旧段落与章节上下边距;改成flex后边距不再折叠,出现间距相加。本轮替换六篇整个内嵌样式,不继续追加覆盖补丁。样式唯一源为`content/hn/tutorials/guide.css`,同步内嵌进六篇;正文、配图及链接不变。根布局gap14px、段落margin0、列表gap6px;章节间隔32px,首节24px;折叠summary最小高度40px,默认隐藏备用内容,保留pointer、hover和键盘焦点反馈。移动端对应缩小字号及gap。
|
||||
|
||||
六篇源与数据库、内嵌样式与guide.css均回读一致;逐篇检查初始折叠、点击展开、Enter收起及全页截图后的布局,无相邻正文块、列表项和FAQ交叠,无横向溢出;实际桌面段距14px、列表项间距6px。六篇全页截图均人工查看。用户当前Android标签也已刷新验证。此轮未模拟移动设备,不把响应式CSS检查当作手机实测。备份、脚本和浏览器数据:`codex/output/hn-tutorial-spacing-20261029/`;截图在本聊天`outputs/hn-spacing/`。
|
||||
|
||||
新手指引ID1由六行列表改为完整入口页:开始前的套餐与流量检查、六个平台与所用软件、站内「所有客户端」入口、安装/导入/连接三步概览,以及问题定位和工单说明。路由器注明OpenWrt兼容固件并提示新手先用手机或电脑。正文唯一源为`index.html`,局部样式只作用于`.hn-start-guide`。旧ID1正文备份`index.before.json`,仅修改body;标题与分类不变。仍仅本地保存,未提交、推送或上线。
|
||||
|
||||
ID1本地页面验收:六个设备入口与软件标签、三步概览及求助说明完整显示;两列布局无横向溢出或相邻块重叠,所有入口鼠标样式为pointer;点击Windows进入ID3并通过文末入口返回ID1。七篇正文与数据库回读一致,所有站内目标文章存在,六篇教程除样式外内容保持不变。新手指引截图`outputs/hn-spacing/index.png`,DOM检查及最终摘要在本轮备份目录。未操作任何实际下载或外部站点。
|
||||
|
||||
|
||||
## 2026-10-30 已发布生产
|
||||
|
||||
正文、客户端下载页面及配图已随HN功能提交e9b0a68发布。生产原文章表为空,本轮事务明确分配ID1—8并校验引用,入口与本地一致;全部8篇已回读,26项教程/下载公共资源HTTP200。没有复制本地账号、用户或订单;未做线上页面或客户端实机验收。发布、备份和回退见HN_PRODUCTION的2026-10-30统一发布节。
|
||||
@@ -0,0 +1,61 @@
|
||||
# XB共用支付健康监测
|
||||
|
||||
2026-10-30用户明确批准共用核心能力、默认开启检测与自动开关、每6小时运行,以及提交推送后分别部署HN/DPL、定期无实付检测与独立TeleHub告警。另明确批准PaymentService旧订单回调保护及Payment模型清理人工操作归属的最小钩子。首批范围为现有EPay支付宝/微信;FUC后端不属于这次XB发布。
|
||||
|
||||
## 默认行为与边界
|
||||
|
||||
`PAYMENT_HEALTH_ENABLED=true`、`PAYMENT_HEALTH_AUTO_TOGGLE=true`为默认值。Artisan `payment:health-check`由原项目scheduler按北京时间00/06/12/18点执行;任务、状态和调用凭据均在该实例自己的执行服务器,白色机仅SSH跳板及已登记Git服务访问。
|
||||
|
||||
每通道每6小时槽最多一次,即使进程中断、同轮修改配置或重复执行也不补单;每实例每日最多8次探测。每次金额32元,只通过原PaymentService/EPay插件生成独立PH前缀的合成待支付请求;不创建应用用户或订单,不扫码、不付款。第三方仍会保留待支付记录。该合成订单不在应用订单表,任何意外回调仍须通过原真实订单查找/验证,不能开通权益。未知结果不自动重发同笔请求。
|
||||
|
||||
初始网关仍须在PAYMENT_HEALTH_ALLOWED_HOSTS中精确登记。用户2026-10-30明确要求落实动态下游:默认PAYMENT_HEALTH_DYNAMIC_HANDOFFS=true,从已验证网关响应中解析的HTTP重定向、HTML表单或已支持的JS跳转,可跟随动态HTTPS收银域名,无需逐域名批准。每跳重新校验证书、域名格式与DNS公网地址,拒绝HTTP、IP字面量、私网/保留及IPv4映射IPv6地址、用户信息、非443端口和片段,最多4次请求;DNS校验后用CURLOPT_RESOLVE固定本次连接地址,自动重定向始终关闭。新域名不自动成为后续任务的可信入口,也不自动加入任何持久白名单。可将动态开关设false回到严格名单模式。
|
||||
|
||||
初始请求使用POST正文,不将商户签名挂在初始URL;不输出密钥、签名、二维码、用户数据或探测完整链接。允许名单原值pay.airspay.top、q.orltjrp.cn、api.shangri-la.vc保持兼容,当前配置实际入口为pay.airspay.top。未适配、缺配置及排除通道明确跳过,不误关。规则策略版本变化允许旧unapproved_host状态在下一槽重新检测,但保留本轮claim与每日预算,不同槽前不补单。其它不安全目标仍进入review_required,不降低HTTPS或内网隔离规则。
|
||||
|
||||
网关200不代表成功。最终页须无已知业务错误、金额匹配,并具备支付URI及二维码渲染证据;PNG路径还检查真实QR三个定位图形,普通方图不算。确认404/410或已知商户/通道/过期错误立即停用;网络超时、DNS失败或5xx连续两轮才停用;普通无二维码200为不确定,告警但不擅自启用。检测只证明当时收银展示可用,不证明实际到账。
|
||||
|
||||
## 自动控制与旧订单
|
||||
|
||||
仅改`Payment.enable`,不改商户参数或其它通道字段。自动关闭同时在原v2_settings表写`payment_health_lease_<uuid>`归属元数据,无新表/迁移;签名HMAC摘要不含明文商户凭据。归属与开关同一数据库事务,因此停机/崩溃不丢失回调保护或恢复依据。人工改动通道会清除归属,连同一秒内先开后关也能识别;原本人工停用通道不自动重开。只有仍归属于监测关闭、配置及通道身份未变的通道,新一轮严格成功后才恢复。
|
||||
|
||||
`PaymentService::notify`对监测关闭通道仍调用原插件全部签名、商户、金额、状态及幂等验证,并只接受自动关闭前已有订单。人工关闭、变更商户配置、伪造请求、错误金额、关闭后的新订单均不放行。正常启用通道保留旧行为。没有实现真实付款自动验收。
|
||||
|
||||
## 状态、锁与通知
|
||||
|
||||
每实例`storage/app/private/payment-health/state.json`及锁文件0600,目录0700;原子写入、落盘后才请求外部服务。实例身份包含站点URL及数据库,禁止混用状态。损坏状态失败关闭执行流程,不清空后重建检测单;禁止通过删除状态绕过每日/每轮限额。根进程写文件继承专属目录属主,避免后续站点用户无法读取。
|
||||
|
||||
事件正文与稳定幂等键一并持久化;故障error、恢复notification,目标base。各实例独立TeleHub调用凭据,仅授权这两类和base,服务地址/Key分别为PAYMENT_HEALTH_TELEHUB_URL与PAYMENT_HEALTH_TELEHUB_KEY,Key只在服务器.env及私有备份。请求超时用原幂等键重试,不新建消息;已接收则查询本事件UUID回执。sent/failed/uncertain/cancelled终态不盲目补发,接收/排队不算Telegram已确认。持续同一故障不刷屏,首次正常检查静默。
|
||||
|
||||
可配置`PAYMENT_HEALTH_EXCLUDED_IDS`、入口`PAYMENT_HEALTH_ALLOWED_HOSTS`及`PAYMENT_HEALTH_DYNAMIC_HANDOFFS`。DomainHub已评估:XB当前未接收其配置快照,本轮使用实例.env中精确登记地址,不另建后台或声称已接入DomainHub。
|
||||
|
||||
## 验证与发布
|
||||
|
||||
隔离内存数据库/模拟HTTP验证6小时默认、限额与同轮防重、并发锁、崩溃恢复、损坏状态、人工操作、健康开关、未知主机、404中间页陷阱、二维码与金额、TeleHub幂等/回执,以及真实EPay验签/实际回调控制器的重复回调不重复派发。真实首轮按相同槽号记账,不另建验收订单;两站分别回读状态、通道、调度和TeleHub回执。真实旧订单付款不执行。
|
||||
|
||||
代码、提交、部署、首轮检测与TeleHub真实送达分别记录;未完成不冒充上线。具体版本、备份和收据见下述生产验收。
|
||||
|
||||
## 停用与回退
|
||||
|
||||
先在目标实例设置PAYMENT_HEALTH_ENABLED=false、PAYMENT_HEALTH_AUTO_TOGGLE=false并刷新该实例配置缓存;保留检测状态、通知回执及SQL归属,不恢复整个业务库或商户参数。人工启停会取消监测归属。回退核心前,核对仍停用通道的历史待支付订单:必须保留其有效回调路径,或在确认通道安全后恢复enable,不能把旧回调拒绝逻辑与监测关闭的通道混用。状态备份含每日/每槽账本,恢复后不要重复创建已执行的检测单。
|
||||
|
||||
## 2026-10-30生产部署与首轮验收
|
||||
|
||||
功能提交XB `278baa4796f004d77ae03945d49072f4b395aeb9`,主分支合并 `625b6820112cf2a8bad6a72c14a3402d6c8b02af`;HN独立分支同功能提交 `2621df96e0d56f8af892c082c6a0ac103a72ad30`。均已经白色机Git推送,sitejp02两站分别快进到上述功能提交。DPL/HN均已配置检测与自动控制为true,读取现有项目scheduler执行北京时间00/06/12/18点调度;未新增白色机业务调度。未来衍生实例部署此版本后默认开启,仍须配置自己的告警凭据;本轮没有部署FUC或未知实例。
|
||||
|
||||
首轮在2026-10-30第2槽(12:00—18:00)各发出支付宝/微信32元探测各一笔。两站微信下游api.shangri-la.vc返回404,均自动关闭ID2且SQL归属有效;支付宝遇到未批准下游返回review_required,停止跟随及后续探测,ID1保持启用,不能声称支付宝本轮收银验证通过。这是动态下游调整前的历史首轮结果;后续用户已明确批准动态HTTPS下游策略,仍不得删除状态或同槽重新发单。旧支付宝二维码成功仅是历史证据。
|
||||
|
||||
TeleHub已分别建立最小权限调用方:DPL xb-dpl-payment-health-prod(ID8)、HN xb-hn-payment-health-prod(ID9),只允许error/notification与base,凭据仅在各站私有.env及root私有备份。首轮各两条异常消息均查询到sent,共4条真实告警已送达;没有改全局投递开关。恢复消息代码已隔离验证,尚无真实通道恢复事件。
|
||||
|
||||
同槽重复执行两站均already_checked_or_review,每站预算仍2,没有额外创建探测单。HN用户42/订单4,DPL用户103/订单6首轮前后不变;商户等受保护字段哈希不变。两站主页服务器侧HTTP200。隔离核心26测试117断言、HN含管理员套餐/品牌回归46测试166断言通过;未实际付款、未做真实有效支付回调或线上页面验收。
|
||||
|
||||
备份与服务器收据:sitejp02 `/root/codex-backups/xb-payment-health/20261030/`,每站子目录含before.json、v2_payment/v2_settings变更前SQL、配置缓存备份、applied.json、acceptance.json和回调验证收据;.env变更前及TeleHub私有记录位于同一受保护根目录。保留正在使用的state.json,不覆盖业务表恢复。
|
||||
|
||||
首次部署因root严格umask使新增源码不可读,在首轮请求前停止;已仅修复本次app/config/tests/docs源码文件0644及父目录0755。后续Git检出使用022,秘密和备份保持私有;配置在独立候选APP_CONFIG_CACHE生成,验证后原子替换并赋予各站运行用户0640。仅通过对应FPM Unix socket定向失效本次PHP文件与配置的OPcache,未重启共享FPM或更改网络。成功收据applied.json优先于原失败留档failed.txt。
|
||||
|
||||
## 动态下游调整(2026-10-30)
|
||||
|
||||
用户指出支付商收银地址动态分配,并明确要求“调整,落实”。本次共用修改仅涉及HttpsTransport、EpayProbe、Monitor的策略指纹及payment_health配置;应用到HN/DPL,默认允许可信网关链上的动态HTTPS收银域名,不扩大为任意初始入口或内网访问,不改商户参数、订单、模型钩子和回调验签。先隔离测试动态表单/重定向、入口名单、HTTPS/私网限制、同槽不重复及下一槽解锁,再Git发布。回退设置PAYMENT_HEALTH_DYNAMIC_HANDOFFS=false并原子刷新缓存,保留原账本;回退代码同样不删除claim。真实检测沿既定6小时槽运行,不额外补单或实际付款。
|
||||
|
||||
本次功能提交XB/DPL 108fbfa79838c0e2259eb401eaafd05ea8ceac49、HN 741467eb1e5c9503a3b8c8ad0667cac8ae778811,主分支合并ad0f04b1d47ba8c99bd5dfcf5bf3ebcbbb2ffb88,均已推送并在sitejp02分别Git快进部署。共用29测试137断言、HN含品牌/管理员套餐49测试186断言通过。两站配置enabled/auto_toggle/dynamic_handoffs均true,原子配置缓存与定向OPcache更新完成;主页HTTP200,用户/订单/商户等业务元数据前后一致。同轮复跑均already_checked_or_review,每站每日预算仍2,未新增检测单或实际付款。下次原调度为北京时间2026-10-30 18:00,届时旧名单阻断状态可重新检测;本次不冒充新策略真实收银已通过。备份及applied.json在原私有备份根目录的dynamic-handoff/{hn,dpl}/,包含原配置缓存及原state副本;不覆盖当前账本。已完成服务器侧验收,未做线上页面验收。
|
||||
|
||||
动态下游最终公网校验补充:PHP ^8.2原NO_PRIV_RANGE/NO_RES_RANGE会放过CGNAT共享网段及多播;现使用GLOBAL_RANGE并明确拒绝IPv4/IPv6多播及IPv4映射IPv6,隔离测试覆盖100.64.0.1、224.0.0.1、169.254.169.254、ff02::1、::ffff:127.0.0.1,以及正常公网地址。不发真实网络请求来测试这些内部目标。
|
||||
@@ -15,6 +15,15 @@
|
||||
|
||||
| 文件 | 用途 |
|
||||
| --- | --- |
|
||||
| HN_MAIL_GATEWAY.md | HN独立企业邮箱/Resend、辅助域名、订阅网关、验收及恢复 |
|
||||
| HN_SHOP_PERIODS.md | HN购买页隐藏不可购买周期、隔离与验收 |
|
||||
| HN_PLANS.md | HN标准/专业定价流量、介绍分行、本地与生产验收及恢复 |
|
||||
| HN_PAYMENT.md | HN支付商户复用、独立回调、无实付验收及恢复 |
|
||||
| HN_PRODUCTION.md | HN生产版本、主域名/后台、独立运行服务、TLS、服务器验收与回退 |
|
||||
| HN_TUTORIALS.md | HN六平台站内教程、客户端下载关联、素材、验收与回退 |
|
||||
| SITE_PROFILES.md | dpl / hn 独立部署参数、主题选择、开发与发布隔离 |
|
||||
| THEME_DESIGNS.md | tpl-a 等可复用设计方案、定稿与绑定状态、预览和验证边界 |
|
||||
| XBOARD_THEME_SURVEY.md | Xboard 生态主题一手来源、同名项目区别与本地库存范围 |
|
||||
| ARCHITECTURE.md | 服务入口、前后端边界、配置来源、开发与检查 |
|
||||
| BUSINESS_RULES.md | 邮件、提醒、账号与支付等不可随意改变的约束 |
|
||||
| DEPLOYMENT.md | Git 发布、备份、运行依赖、恢复及故障排查 |
|
||||
|
||||
@@ -0,0 +1,252 @@
|
||||
# dpl / hn 独立实例与主题
|
||||
|
||||
2026-10-27 用户确定 hn 先使用 `EZ`。当前独立工作树的默认值与 `.env.hn.example` 已改为 EZ,旧 Hardnerd 功能草稿保留为显式选项;已批准的 `tpl-a` 继续独立保存、不绑定 hn,见 [THEME_DESIGNS](THEME_DESIGNS.md)。2026-10-27 已独立部署 HN 到 sitejp02,主域名 hardnerd.net;DPL 未发布。当前生产和回退见 [HN_PRODUCTION](HN_PRODUCTION.md)。
|
||||
|
||||
## 配置与边界
|
||||
|
||||
同一后端仓库、同一业务逻辑,分别部署到各自服务器/目录。`SITE_PROFILE` 为启动参数,不按访问域名切换租户,不共享数据库。
|
||||
|
||||
| 参数 | 行为 |
|
||||
| --- | --- |
|
||||
| 未设置或 `SITE_PROFILE=dpl` | 保持既有 APP_NAME、APP_FULL_NAME、数据库品牌设置与 frontend_theme(包括 Stellar),缓存/Redis/Horizon/session 默认命名规则不变 |
|
||||
| `SITE_PROFILE=hn` | 默认 EZ,示例配置显式 `SITE_THEME=EZ`;旧 Hardnerd 草稿仅在显式 `SITE_THEME=Hardnerd` 时启用;默认 hardnerd / hardnerd.net;独立命名空间 hn_cache / hn_database_ / hn_horizon: / hn_session |
|
||||
| 其他值 | 启动报错,防止拼写错误误选 dpl |
|
||||
|
||||
hn 可用 `SITE_NAME`、`SITE_FULL_NAME`、`SITE_DESCRIPTION`、`SITE_LOGO` 覆盖品牌;后台读到的主题/品牌与部署配置一致,不能在后台切换成另一站的主题。读取覆盖在缓存取出后、请求内合并,不写回原有设置,也不污染 Redis 中的配置。dpl 后台设置流程保持原状。
|
||||
|
||||
**选择 hn 不会自动创建数据库或隔离错误复制的私密环境。** 使用 `.env.hn.example` 建立 hn 自己的 `.env`,独立创建 hn 数据库和最小权限用户、APP_KEY、storage、日志及 worker/scheduler。不得复用 dpl 的实际 `.env`、业务数据库、storage 挂载或加密配置。显式 CACHE_PREFIX / REDIS_PREFIX / HORIZON_PREFIX / SESSION_COOKIE 优先于默认值,复制环境时必须核对。
|
||||
|
||||
邮件、支付商户、订阅域名、节点和通知配置由 hn 自己设置。共用功能不等于已有外部资源授权共用;新实例未配置这些服务时,不宣称能发信、收款或提供真实节点。
|
||||
|
||||
## EZ 来源与适配
|
||||
|
||||
原始源码:[EZTHEME/EZ_THEME](https://github.com/EZTHEME/EZ_THEME),package v0.4.0;Git 子模块 `frontends/ez-theme` 锁定 `2c0581386d86006315e6eba2f5970c923892caba`。上游源码不直接改写,hn 适配层在 `frontends/hn`,依赖和锁文件在 `frontends/`。后台资源与 Stellar 各自既有仓库边界保持不变。
|
||||
|
||||
上游 package.json 标注 ISC,当前锁定版本未包含单独 LICENSE 文件;保留作者/上游出处,公开再分发前复核授权声明,不能自行称作 MIT。
|
||||
|
||||
适配明确使用 Xboard API、当前站点的 `/api/v1`,删除演示 API、中间件地址和占位客户端链接。默认深色、绿色主题和 hn logo;禁用上游的随机外部背景、工单第三方图片托管、工单外部 IP 定位与 Crisp 用户数据传送。登录验证码仍由实例配置决定,不改变后端验证逻辑。客户端导入等 EZ 自带能力保留,下载卡片因未指定正式链接而隐藏。EZ 使用 hash 路由,无需修改 dpl Stellar history fallback。
|
||||
|
||||
后端服务、认证、用户、套餐、订单、支付、邮件与订阅仍使用同一现有实现;只接入站点配置和主题。浏览器令牌保存于本站 origin,部署应使用两个独立域名。
|
||||
|
||||
## 本地开发
|
||||
|
||||
在独立 hn checkout 使用自己的 `.env`、空数据库和独立 Redis。不要把 dpl 的本地运行目录改成 hn。
|
||||
|
||||
```bash
|
||||
git submodule update --init frontends/ez-theme
|
||||
cd frontends
|
||||
npm ci --ignore-scripts
|
||||
npm run dev:hn
|
||||
```
|
||||
|
||||
固定开发入口为 `http://hn.loc/`(2026-10-27 已配置并在浏览器验收 EZ 首页)。hosts 仅映射 `127.0.0.1` / `::1`;前端 Nginx 的 `/usr/local/etc/nginx/servers/hn.loc.conf` 同样只监听双回环80。普通请求代理独立 HN PHP `127.0.0.1:8592`;`/__hn_vite/` 代理 EZ Vite `127.0.0.1:5184`,保留 WebSocket 升级。未让 root Nginx 直接读文稿、未扩大 GemCodes 书签或监听权限;此工作树仍在既有 Codex 路径,PHP CLI 直接提供 public。
|
||||
|
||||
Vite 标记文件 `storage/framework/ez-vite.hot` 内容为 `http://hn.loc/__hn_vite`;后端只在允许的本地 hostname、标记匹配且5184在线时加载该同源路径,公共 hostname 或失效标记仍回退正式资源。APP_URL 已设为 `http://hn.loc`,其余私密环境未变,数据库仍是 `database/hn-preview.sqlite`,Redis 仍为独立6387。未将 Laravel .env 注入前端。
|
||||
|
||||
2026-10-27最初使用三个临时进程;2026-10-28按用户要求已改为下述用户LaunchAgent登录自启及KeepAlive。以下手工命令仅作排障参考,使用前先停止对应HN LaunchAgent并确认专用端口空闲,不与自启进程重复运行、不结束其他项目进程:
|
||||
|
||||
```bash
|
||||
# Redis:无持久化的本地演示缓存,不使用 dpl 的 Redis
|
||||
/usr/local/bin/redis-server --bind 127.0.0.1 --port 6387 --protected-mode yes --save '' --appendonly no
|
||||
# PHP:在本工作树的 public/ 下运行,使用实际 PHP 8.4,避免 Herd 占位二进制
|
||||
cd public
|
||||
/usr/local/bin/php -S 127.0.0.1:8592 -t . ../vendor/laravel/framework/src/Illuminate/Foundation/resources/server.php
|
||||
# Vite:在本工作树根运行
|
||||
npm --prefix frontends run dev:hn
|
||||
```
|
||||
|
||||
`npm run dev:hn` 的内部端口已由5174改为5184,避免与其他项目冲突;生产构建路径不变。不能把直接打开 Vite 或8591设计预览当作 hn.loc 的功能入口。
|
||||
|
||||
历史 EZ/功能预览使用工作树内部 `database/hn-preview.sqlite` 和临时 Redis `127.0.0.1:6387`;这些不是 dpl 数据。2026-10-14 当前 `http://127.0.0.1:8591` 已切为纯前端设计预览,不连接该 SQLite / Redis。启动区别见 [THEME_DESIGNS](THEME_DESIGNS.md)。
|
||||
|
||||
## 发布与恢复
|
||||
|
||||
2026-10-27 HN 首发已按 Git 提交、推送并在 sitejp02 更新到明确提交;实际版本、独立服务、TLS、备份和服务器验收见 [HN_PRODUCTION](HN_PRODUCTION.md)。后续发布按 Git:提交并推送共享版本,在指定 hn 服务器 checkout 更新明确提交,初始化锁定子模块、安装依赖并构建。版本升级前备份 hn 自己的数据库/配置;dpl 发布单独授权、单独验收。
|
||||
|
||||
```bash
|
||||
git submodule update --init frontends/ez-theme
|
||||
cd frontends
|
||||
npm ci --ignore-scripts
|
||||
npm run build:hn
|
||||
cd ..
|
||||
php scripts/hn/publish-assets.php
|
||||
php artisan config:cache
|
||||
```
|
||||
|
||||
构建输出 `theme/EZ/assets/` 默认忽略,不把下载依赖/私密环境入 Git;发布脚本仅允许 hn 配置,将 EZ 资源复制至当前实例 `public/theme/EZ`,不切换或删除其他主题。脚本需要 PHP >=8.2、Laravel dependencies 与 hn 自身运行资源。修改参数前需清理旧配置缓存,发布后重启 hn 自己的长驻 worker/Octane。首次实例初始化按已有安装流程执行迁移、创建独立管理员;不要通过拷贝 dpl 用户和订单完成初始化。
|
||||
|
||||
回滚恢复 hn 的原 Git 版本、原 lock/submodule 和相应构建资源,清配置缓存、重启 hn 进程;本次没有新增业务迁移。不要把已运行 hn 的参数切成 dpl 代替版本回滚。现有 dpl 部署无需安装或构建 EZ;保留原主题和环境即可。
|
||||
|
||||
## 验证
|
||||
|
||||
新增站点测试:`php vendor/bin/phpunit --bootstrap vendor/autoload.php tests/Feature/SiteProfile`。前台配置测试:在 frontends 运行 `npm run test:hn`。构建检查:`npm run build:hn`。
|
||||
|
||||
支付/邮件既有隔离套件和订单并发套件应在独立 PHP 进程运行:前者使用精简 user schema,Eloquent 的静态 guardable columns 缓存会影响后者,合并执行可产生缺 password 的测试夹具错误。不要据此修改业务模型。
|
||||
|
||||
当次实际验证与尚未验收事项见 [STATUS](STATUS.md)。不将本地主题验证当作服务器上线、真实付款或客户端节点连接验收。
|
||||
|
||||
## HN 本地登录自启(2026-10-28,已安装并验证)
|
||||
|
||||
用户明确要求PHP、Redis和Vite自启。当前用户UID501的三个 `~/Library/LaunchAgents/net.hellcat.hn-dev.{redis,php,vite}.plist` 已安装并在gui/501加载,RunAtLoad=true、KeepAlive=true、ThrottleInterval=10、Aqua用户会话、umask077。不使用root daemon,不扩大到公网;这是开机登录用户后启动,未登录/文稿尚未解锁时不承诺可访问。
|
||||
|
||||
- Redis:`/usr/local/bin/redis-server`,仅127.0.0.1:6387,关闭RDB/AOF,保持原本独立演示缓存用途。
|
||||
- PHP:`/usr/local/bin/php -S 127.0.0.1:8592`,public目录与Laravel内置router均指向本HN工作树。
|
||||
- Vite:直接使用 `/Users/hellcat/.nvm/versions/node/v22.19.0/bin/node` 执行本工作树 `frontends/node_modules/vite/bin/vite.js`,加载hn/vite.config.mjs,仅127.0.0.1:5184,strictPort=true;未用npm中间进程,避免孤立子进程占端口。Node版本路径若将来卸载或迁移,须同步此plist并验证。
|
||||
|
||||
实际PHP/Node的launchd后台目录读取预检通过,没有新增Documents或全磁盘权限。接管前核实并只停止上轮本任务的三个独立进程组,保留其他项目服务。真实SIGTERM自动恢复测试中三项均产生新PID并恢复监听;hn.loc首页、Vite客户端、公开配置接口和admin.hn.loc均200。没有重启电脑,首次实际重启登录仍待观察,不能声称已验收整机重启。
|
||||
|
||||
日志 `~/Library/Logs/HardnerdDev/{redis,php,vite}.{out,error}.log`;安装plist副本、预检、旧进程身份及验收回执在共享仓库忽略目录 `codex/output/hn-launchagents-20261028/`。这些文件不含密码。可用 `launchctl print gui/$(id -u)/net.hellcat.hn-dev.php` 查看单项状态,替换后缀redis/vite可查其余两项。`launchctl kickstart -k gui/$(id -u)/net.hellcat.hn-dev.php`仅重启本地PHP,其他服务类推;正常不手工再启动一份。
|
||||
|
||||
回退:逐项 `launchctl bootout gui/$(id -u)/net.hellcat.hn-dev.php`(redis/vite同理),确认退出后将本任务三个plist移入私有备份目录,再按上方手工命令启动。不要bootout其他项目或Homebrew服务,不删除本地SQLite/环境/Redis以外业务数据,不修改线上。
|
||||
|
||||
同日用户要求本地套餐先可见:已在线备份独立SQLite,将原ID1“hn 本地演示套餐”19元/100GB更新为“个人套餐”32元/月、220GB/月,季90、半年175、年336、重置32,按购买日每月重置;展示建议6设备,实际设备/速度限制null。没有创建本地节点或同步线上用户/订单,group_id仍为本地原null。PlanResource元转分3200和流量220、模板渲染通过;备份位于共享仓库 `codex/output/hn-local-plan32-20261028/before.sqlite`(600)。
|
||||
|
||||
## hn.loc 验收与回退(2026-10-27)
|
||||
|
||||
双栈解析仅回环;首页、Vite client/main.js、品牌SVG和公开站点配置接口均200,接口品牌 hardnerd。浏览器显示 EZ 的 hardnerd 深色首页,日志确认 `[vite] connected.`,未见警告/错误。原 dpl.loc 与 home.loc 首页均200。站点回归14项/31断言、EZ配置测试1项、PHP语法和差异检查通过。没有登录账户、创建业务记录、真实付款或访问线上。
|
||||
|
||||
备份及截图:主工作区 `codex/output/hn-local-domain-20261027/`(含私密.env备份,文件600,不提交);管理员安装备份与回执在 `/private/tmp/hn-loc-admin-20261027/`。撤回域名时只移除本次 `hn.loc.conf` 及 hosts 中带 HN 标记的两条精确映射,先 `nginx -t` 再向核实后的 master 平滑HUP;不恢复整份hosts覆盖其他项目新条目。开发文件按备份逐项比较恢复,APP_URL 改动也只恢复对应字段;不覆盖并行修改,不清理SQLite数据。域名和服务配置已本机启用,代码未提交、推送或生产发布。
|
||||
|
||||
## HN 本地默认管理员(2026-10-27)
|
||||
|
||||
用户要求补齐默认管理员。账号/密码按 GemDocs AI版 `ACC-005` 的统一字段契约取用,本文不保存凭据值。本次先检查发现约定账号不存在;SQLite在线备份后,使用项目官方 `XboardInstall::registerAdmin` 在 hn-preview.sqlite 中创建,用户ID3,is_admin=true、banned=false,密码哈希匹配。未覆盖旧管理员或用户、未触碰dpl/线上库。
|
||||
|
||||
管理入口现为 `http://admin.hn.loc/`(同日按用户要求新增);原 `http://hn.loc/hn-preview-admin` 继续兼容。浏览器已确认登录界面、邮箱与密码框正常显示。本次通过该实例正常HTTP登录API获得is_admin=true,并验证管理端plan/fetch返回200、访客同一路由403;接口返回的凭据和业务内容没有输出。唯一API验收会话已撤销,未在浏览器保存登录状态或密码,未改验证码/认证策略。
|
||||
|
||||
任务前数据库备份位于主工作区 `codex/output/hn-local-domain-20261027/hn-before-default-admin.sqlite`(600,含私有数据,不提交)。默认账号已经创建;如需撤销仅处理本次新建ID3并核对其后业务引用,不能整库覆盖丢失后续修改。后台登录页面截图同目录 `hn-admin-login.png`。各实例账号独立存在,此本地结果不代表HN生产管理员已经建立。
|
||||
|
||||
## EZ 购买套餐页精简(2026-10-27)
|
||||
|
||||
用户指定:中文“商店”改为“购买套餐”,移除进入页面自动弹出的用户须知,以及全球节点、极速体验、流媒体解锁、多设备支持四张宣传卡片。HN 适配层在 `runtime-config.mjs` 设置 `SHOP_CONFIG.popup.enabled=false`、`showPlanFeatureCards=false`;Vite 适配仅改写简体中文模块的“商店”文案,覆盖导航、页面标题与返回入口。上游锁定子模块保持原样,其他实例和语言不改;套餐/价格/库存/支付/下单二次确认逻辑未改。
|
||||
|
||||
本地浏览器已验证:导航与标题显示购买套餐,从仪表盘进入不再弹须知,四张宣传卡片不显示,套餐和购买按钮正常显示;一次性筛选空态及重置筛选可用,控制台无警告/错误。EZ同源配置测试及差异检查通过。未创建订单、未付款、未构建发布或修改dpl。截图和两文件修改前备份位于主工作区 `codex/output/hn-shop-cleanup-20261027/`。
|
||||
|
||||
## 独立本地后台域名(2026-10-27)
|
||||
|
||||
用户指定 `admin.hn.loc`。hosts 新增IPv4/IPv6回环映射;`/usr/local/etc/nginx/servers/admin.hn.loc.conf` 只监听127.0.0.1/[::1]:80,精确根 `/` 内部代理到既有PHP8592的 `/hn-preview-admin`,其他管理静态资源和API同源代理至同一PHP。浏览器地址保持 `http://admin.hn.loc/#/sign-in`,无需携带内部管理路径。未改app_url、secure_path、账户、认证中间件或前端构建产物;后台与hn.loc属于两个浏览器origin,登录状态分别保存,使用同一HN本地管理员。
|
||||
|
||||
验收:解析仅双回环;管理HTML与8项静态资源均200;浏览器实际显示品牌登录界面且无警告/错误;在新域名实际管理员登录/受限接口200、访客403,准确比对登录前会话ID后仅撤销本次新增验收会话。hn.loc/dpl.loc首页仍200,原hn.loc虚拟主机摘要未变。未访问线上、未改其他站点或放宽监听/认证。
|
||||
|
||||
安装候选、原hn.loc摘要及截图:主工作区 `codex/output/hn-admin-domain-20261027/`;管理员hosts备份/回执在 `/private/tmp/hn-admin-loc-20261027/`。回退只移除 `admin.hn.loc.conf` 与hosts中本次精确域名两行,保留hn.loc映射及并行配置;nginx配置检查通过后对核实的master平滑HUP。不覆盖整份hosts。
|
||||
|
||||
## 公告与购买须知的区别(2026-10-27代码核对)
|
||||
|
||||
购买套餐页须知仅由 `SHOP_CONFIG.popup.enabled` 控制,本次设false不涉及公告。网站公告由 `/api/v1/user/notice/fetch` 提供启用项,在仪表盘公告卡片展示标题/日期,查看详情打开公告弹窗;当前EZ自动弹窗只识别tags数组里的精确“弹窗”标签,选择返回列表中第一条符合者,并按公告ID在sessionStorage记录,当前标签页会话仅自动展示一次。后台独立popup字段不是该主题现有判断条件。未修改这套逻辑、未新建公告或做新的公告发布实测。
|
||||
|
||||
## HN当前套餐(2026-10-28后续调整)
|
||||
|
||||
本地与线上均已将个人32改名标准32/220GB,新增专业200/1375GB,介绍显式三行;专业其他周期按200/32等比。唯一参数/备份/恢复及验收见[HN_PLANS](HN_PLANS.md),本页先前“本地个人套餐”是改名前历史记录。
|
||||
|
||||
### HN本地文档展示文章(2026-10-28)
|
||||
|
||||
用户要求文档中添加文章看效果;仅本地HN独立库新增Knowledge ID1「快速开始」,入门指南/zh-CN/show=true,Markdown正文涵盖套餐、订阅、连接及工单。实际浏览器文档列表及#/docs/1正文显示通过;未发布线上、未修改DPL或XB核心。正文、应用脚本、修改前SQLite备份及截图在共享仓库codex/output/hn-doc-demo-20261028/。恢复优先核实ID1后仅隐藏该文章,不整库覆盖后续修改。
|
||||
|
||||
### 当前预览账号开通套餐(2026-10-28)
|
||||
|
||||
用户要求给当前账号任意套餐;浏览器用户中心确认本地登录账号后,仅对HN本地User ID3配置标准套餐ID1,一个自然月至2026-11-28、220GiB可用额度,清零本地用量、设置下次重置和到期,保留账号其余属性及订单数量。实际仪表盘显示标准套餐/220GB/到期2026-11-28通过;未操作线上/DPL,不创建订单或付款,不改XB核心。脚本、修改前SQLite备份及截图:共享仓库codex/output/hn-local-grant-20261028/;恢复仅按该用户本次变更字段核实后回退,不整库覆盖后续数据。
|
||||
|
||||
### HN仪表盘欢迎提示(2026-10-28本地)
|
||||
|
||||
用户指定欢迎标题与邮箱收藏提示,并要求HN风格警示图标。仅HN主题适配frontends/hn/vite.config.mjs将简体中文dashboard.welcome改为「欢迎来到 hardnerd」、welcomeDesc改为用户提供的mail@hardnerd.dev域名失效自动回复提示;Dashboard欢迎描述前添加24px绿色切角三角感叹号。保留锁定EZ源码、XB核心逻辑和DPL不变;未改邮件运行配置,本轮未重新测试自动回复。Node语法/差异空白检查及本地实际浏览器显示通过。仅本地预览,未提交/推送/部署线上;修改前适配器备份和截图在共享仓库codex/output/hn-dashboard-welcome-20261028/。
|
||||
|
||||
欢迎提示图标后续按用户要求调整为17px黄色(#e4bc58),与文字间距7px、顶部偏移5px对齐首行;仅本地预览,未发布线上。
|
||||
|
||||
用户要求警示图标与文字底部对齐:欢迎提示容器改为flex-end,图标底部留5px以贴合文字可见下沿,保留17px黄色样式;仅本地预览。
|
||||
|
||||
警示图标后续微调为19px,保持黄色、文字底部对齐及7px间距;仅本地预览。
|
||||
|
||||
### 邮箱复制及公告简称(2026-10-28本地)
|
||||
|
||||
HN专属组件frontends/hn/components/HnWelcomeNotice.vue接管欢迎提示,邮箱使用主题色变量--theme-color、加粗及按钮语义,点击调用Clipboard API,HTTP/拒绝时回退聚焦选区+execCommand;成功返回后短暂显示已复制,失败提示手动复制。保留19px黄色警示及底部对齐。HN适配器注册独立组件并将简体siteAnnouncement改为公告,未改锁定EZ源码或XB业务核心。Node语法/差异检查及本地实际点击成功反馈通过;自动化剪贴板/系统pbpaste回读未匹配,不能标记跨客户端系统剪贴板回读验收通过。当前复制实现为标准浏览器API及HTTP回退,尚未核实该自动化环境剪贴板隔离情况。未提交/推送/部署线上,DPL未改。截图共享仓库codex/output/hn-dashboard-welcome-20261028/dashboard-copy.png。
|
||||
|
||||
欢迎提示新增第二行「新手不会使用,可以查看新手教程。」:19px主题绿切角灯泡、方直灯丝/底座、教程文字主题绿并通过RouterLink到/docs。仅HN独立组件,本地实际点击进入文档列表并显示快速开始文章通过;未提交/推送/部署线上,DPL及XB核心未改。截图共享目录codex/output/hn-dashboard-welcome-20261028/dashboard-tutorial.png。
|
||||
|
||||
欢迎提示图标对齐:警告及灯泡仍同为19px/24单位画布,灯泡外形上下范围统一到3—21并略拓宽以平衡视觉;邮箱按钮前新增15px主题绿叠页复制图标,保留同一点击复制处理。仅本地预览,实际页面显示通过,未部署线上。截图codex/output/hn-dashboard-welcome-20261028/dashboard-copy-icon.png。
|
||||
|
||||
新手教程链接前新增15px主题绿打开书本SVG,与文字共用RouterLink点击范围;仅本地HN主题,线上/DPL未改。截图codex/output/hn-dashboard-welcome-20261028/dashboard-book.png。
|
||||
|
||||
### HN新手教程导航(2026-10-28)
|
||||
|
||||
用户要求文章用于按客户端分流,参考DPL。只读核实DPL stellar/src/generated/tutorials.ts及content/tutorials各meta:Windows/macOS/Linux→Clash Verge Rev,Android→FlClash,iOS→Hiddify,路由器→OpenClash。HN本地Knowledge ID1从快速开始改为新手教程,入门指南/zh-CN/show=true,正文六行设备-客户端-教程表,链接均为HN同源既有/tutorials路径;不链接DPL线上、不改DPL文章或XB核心。首页HnWelcomeNotice链接改为/docs/1直达文章。
|
||||
|
||||
六个本地目标HTTP200、正文main及hardnerd品牌通过;实际浏览器首页点击直达文章,表格及六个链接显示通过。此轮仅写导航与核对入口,不代表逐项重新验收六篇详细教程的旧截图、按钮名称或下载资源是否适配HN EZ;既有详细教程仍可能含Stellar操作入口/截图,后续正式发布前应单独审校。未提交/推送/发布线上。正文/脚本/修改前SQLite备份与截图在共享仓库codex/output/hn-beginner-guide-20261028/。回退只处理ID1本次字段及首页链接,不整库覆盖后续修改。
|
||||
|
||||
用户后续定名「新手指引」:本地Knowledge ID1标题改为新手指引,正文六组映射和既有教程链接保留;首页提示改为「新手不会使用?请查看新手指引。」并将提示/链接图标换为绿色路标。仍直达/docs/1,仅本地,线上和DPL未改。
|
||||
|
||||
用户纠正图标位置:新手提示行首恢复19px绿色灯泡,仅「新手指引」链接前为15px路标;仅本地预览。
|
||||
|
||||
### 新手指引下载表(2026-10-29)
|
||||
|
||||
用户草图指定两列:设备、客户端下载&使用教程,下载及教程各有图标。HN本地Knowledge ID1改为7行:Windows、Mac Intel、Mac Apple、Android、iPhone/iPad、Linux、OpenWrt;保留新手指引标题和首页直达。两项链接分别用主题绿色下载/路标SVG(public/brand/hn/icons),Windows/macOS双架构/Android与Linux四包接resource固定公开链接,Linux先到HN独立public/brand/hn/downloads.html选择x64/ARM64与DEB/RPM。Mac中文名称为Apple芯片(Apple Silicon),不保留用户草图中的询问文字。
|
||||
|
||||
resource无OpenClash安装包及iOS Hiddify分发包,因此iPhone保留既有官方App Store,OpenWrt保留官方GitHub发布页;未假造resource入口、未修改resource采集器。仅HN私有素材与文章内容,DPL及XB核心不变。经白色机在sitejp02核验八个resource固定安装包Range206/16字节通过;本机仅访问hn.loc三个新素材/选择页200,无本机线上访问。六组教程映射沿用DPL现场代码,详细教程旧截图/入口仍需独立审校。
|
||||
|
||||
本轮本地修改未提交/推送/部署线上;article.md、apply.php、修改前SQLite备份、图标源、选择页及验收脚本在共享仓库codex/output/hn-guide-downloads-20261028/。resource无需密钥,无新增调度或API调用。
|
||||
|
||||
新手指引表格后续:14个链接改为仪表盘绿色浅底按钮参数(8×16px内边距、6px圆角、14px字),7个下载按钮括号补客户端名称,使用教程图标改为打开的书(guide.svg);图标去除正文图片的边框/圆角/背景。仅本地HN内容与素材,备份及脚本在共享目录codex/output/hn-guide-buttons-20261029/,未改线上/DPL/XB核心。
|
||||
|
||||
用户后续要求新手指引直接为六项教程列表:本地Knowledge ID1正文仅保留Windows端教程、Mac端教程、Android端教程、iPhone / iPad端教程、Linux端教程、路由器端教程六个Markdown列表链接,指向HN既有对应/tutorials页面;移除本文章下载表格和其他说明,既有下载素材/选择页未删除。仅本地,未改线上/DPL或核心。正文修改前备份与应用脚本在共享目录codex/output/hn-guide-list-20261029/。
|
||||
|
||||
|
||||
### HN Windows 图文教程(2026-10-29)
|
||||
|
||||
用户要求参考「比利 - HN 主理」完成Windows图文教程,写入HN站内文档并关联新手指引;后续明确按首次写作重新组织。本轮已从首次使用流程重写,当前本地Knowledge ID3,标题「Windows 使用教程(Clash Verge Rev)」、分类「使用教程」、zh-CN、show=true、sort=20;入口 `/#/docs/3`。正文唯一版本源为 `content/hn/tutorials/windows.html`,保存到本地HN实例Knowledge;ID1当前6项Markdown教程列表的Windows项为 `[Windows端教程](/#/docs/3)`,其他项保留。旧独立入口 `/brand/hn/tutorials/windows.html` 只跳转ID3,不维护另一正文;所有旧调用方迁移后可移除该跳转。
|
||||
|
||||
当前内容按下载安装、网站导入订阅、选择线路、开启系统代理四步展开,解释订阅的用途,突出选中订阅卡片与开启系统代理,手动导入按用户后续要求改为默认折叠的 details/summary,展开显示三步说明与原创操作图;三个常见问题仍直接展示。配图为HN实际导入面板 `windows/02-import.png` 与两张明确标注的原创操作示意 `windows/select-route.svg`、`windows/enable-proxy.svg`;手动导入另用 `windows/manual-import.svg`,展示复制地址、粘贴导入、选中订阅卡片。此前配图未再被当前正文引用,历史交付快照保留。样式仅在正文 `.hn-first-use` 内嵌,使用主题颜色、常规标题和段距,不改共享主题或XB核心。下载仍沿用resource固定x64地址,ARM及其他版本指向站内所有客户端(本地ID2),本次未访问线上安装包。
|
||||
|
||||
客户端用法来源为2026-10-29读取的官方 https://www.clashverge.dev/guide/quickstart.html 、/guide/profile.html 、/install.html 。本地浏览器已查看完整正文:此前整篇验收确认5个标题(4步及排错)、3张主流程图片加载正常、无横向溢出;源文件与数据库正文一致,图片路径和SVG语法检查通过。截图位于 `/Users/hellcat/Documents/Codex/2026-10-28/new-chat-3/outputs/hn-windows/first-use-preview.png` 与 `first-use-full.png`。写入前逐次核对当前正文并保留备份,避免覆盖并行内容;本轮前正文在该聊天 `work/hn-windows/first-use-rewrite/body-before.html`。
|
||||
|
||||
未提交、推送、发布线上,未进行Windows实机安装/协议唤起/真实订阅联网;未修改DPL、共用路由、生成器和其他平台教程。数据库文章不随Git自动发布;发布时按目标实例创建并查询实际文章ID,再绑定新手指引和旧入口跳转,不假定生产ID也是3。回退本轮只恢复本轮前ID3正文及对应版本源;撤回整篇时恢复Windows关联并隐藏本篇,不整库回滚,不覆盖并行文章。
|
||||
|
||||
手动导入图解(2026-10-29):本地ID3已与源HTML同步;默认折叠通过,鼠标指针为pointer,点击展开后三步说明和760×470 SVG加载通过,Enter键可收起。摘要用轻量边线与箭头,包含悬停及键盘焦点反馈。修改前备份为聊天work/hn-windows/before-manual-collapse.html,展开截图为outputs/hn-windows/manual-import-expanded.png。仅本地验收,未上线。
|
||||
|
||||
下载关联:用户要求其他版本的提示指向站内「所有客户端」。本篇Windows ARM/其他版本链接已改为 `/#/docs/2`,替换原GitHub官方发布页链接;已核实本地ID2标题与版本下载内容。源HTML和ID3正文同步更新,原Windows x64直接下载按钮保留。生产发布仍需使用目标实例实际文档ID。修改前正文在work/hn-windows/before-all-clients-link.html。
|
||||
|
||||
### 所有客户端文章(2026-10-29本地)
|
||||
|
||||
用户要求列出resource收录的全部客户端。已按resource本地Sources::all与storage/app/private/software/current目录核实9款:Clash Verge Rev、FlClash、v2rayN、v2rayNG、Hiddify、Clash Meta for Android、Shadowrocket、Surge、Quantumult X。6款镜像共48包;3款Apple商店入口,无安装包镜像。HN本地新增Knowledge ID2「所有客户端」,分类客户端下载/zh-CN/show=true,9行平台和获取入口表;HN专属public/brand/hn/all-clients.html列各系统/架构/格式48个resource固定下载链接与3官方商店链接,无前端API/密钥/采集调度。
|
||||
|
||||
本地实际文档列表及文章显示9项通过;选择页HTTP200、9section/48唯一资源链接通过。白色机连续两次认证前关闭连接,未绕行直连或改网络,因此本轮仅核实本地已采集目录,不宣称线上实时目录或全部48包当前可下载;前轮8包服务器Range验收不扩大为48包。未提交/推送/部署HN线上,未改resource、DPL或XB核心。源稿、只读目录快照、脚本、SQLite修改前备份和截图:共享仓库codex/output/hn-all-clients-20261029/。恢复只核实ID2后隐藏该文章/撤回本任务专属页面,不整库覆盖后续数据。
|
||||
|
||||
HN语言入口图标(2026-10-29本地):按用户截图将LanguageSelector按钮内当前语言国旗换为22px通用地球SVG,HN专属适配器仅替换该模板节点;下拉国旗/语言列表和切换事件保留。未改锁定EZ源码、XB核心、DPL或线上。修改前适配器备份及截图在共享目录codex/output/hn-language-icon-20261029/。
|
||||
|
||||
语言入口后续按用户试用要求:地球图标换为22px「文/A」线条翻译图标,保留同一语言按钮与菜单;仅本地预览,未发布线上。
|
||||
|
||||
语言入口最终按用户要求改为随语言变化的两字母缩写:zh-CN→CN、zh-TW→TW、en-US→EN、ja-JP→JP、ko-KR→KR、ru-RU→RU、fa-IR→IR、vi-VN→VN;13px加粗、原圆形按钮,语言菜单及切换逻辑保留。仅HN本地主题预览,未部署线上,DPL不变。
|
||||
|
||||
语言缩写按钮增加悬停/键盘聚焦主题绿文字过渡(0.2s),保留默认文字色及既有按钮背景边框反馈;仅HN本地适配,未发布线上。
|
||||
|
||||
语言缩写悬停过渡与太阳按钮协调:取消文字单独0.2s过渡,改为继承按钮父级颜色,由父级all 0.3s ease统一驱动文字/背景/边框/位移;按下回到原位并用0.1s过渡,与ThemeToggle参数一致,不给字母套用太阳旋转。仅本地HN主题,未上线。
|
||||
|
||||
|
||||
### HN 其余五平台教程(2026-10-29,本地)
|
||||
|
||||
用户明确只补新手指引中的Mac、Android、iPhone/iPad、Linux、路由器。五篇已存为本地ID4—8,ID1六平台入口均改为站内文章;各平台正文、素材、下载目录补充与验收/发布边界唯一记录见 [HN_TUTORIALS](HN_TUTORIALS.md)。Windows当前正文保留。
|
||||
|
||||
|
||||
### HN 查看帮助关闭扫光(2026-10-30,本地完成)
|
||||
|
||||
按用户要求,在HN专用vite适配器为Dashboard追加scoped样式,仅关闭`.stats-card.doc-card::after`的循环扫光(content:none、animation:none),保留悬停反馈。未改共享EZ源码、XB核心或DPL。Vite模块HTTP200,本地hn.loc仪表盘实际显示、伪元素computed animation/content均none;截图位于共享仓库codex/output/hn-help-static-20261030/dashboard.png。未提交、推送或发布线上。
|
||||
|
||||
|
||||
### 订单确认提示弹窗关闭(2026-10-30,仅本地)
|
||||
|
||||
按用户截图要求,HN专用runtime-config关闭ORDER_CONFIG.confirmOrder并清空confirmOrderContent,取消“无法提供教程/没有退款政策”的主题默认确认弹窗;正常订单确认页保留。不修改共享EZ源码、后端订单逻辑或DPL,不代表制定或修改实际退款政策。未提交或发布线上。
|
||||
|
||||
|
||||
### 普通提示配色对齐HN(2026-10-30,仅本地)
|
||||
|
||||
用户反馈订单处理中Toast默认蓝色与主题不一致。HN专用适配器仅为Toast.vue追加scoped规则,在.toast.toast-info内将--info-color映射到--theme-color(回退#8bcf36),普通提示的侧边线、信息图标描边、进度条共同使用主题色,背景/文字沿用现有明暗变量。错误、警告、成功提示语义及定时器不变;未修改共享EZ或DPL。未提交/发布线上。
|
||||
|
||||
本地实际Toast组件隔离预览通过:侧边线、图标stroke、进度条backgroundColor计算值均rgb(139,207,54),截图共享仓库codex/output/hn-toast-theme-20261030/preview.png。临时预览页已移除,无订单提交或付款;主题模块与附加样式Vite编译通过。关闭确认弹窗后的正常结算页已实际打开,未点击提交订单。
|
||||
|
||||
|
||||
### 支付弹窗修复(2026-10-30,仅本地)
|
||||
|
||||
HN专用payment-modal.mjs按paymentQRCode区分扫码与跳转提示,跳转型显示前往收银台;中英文/繁中新增文案,其他语言回退en-US。外层modal-container透明且无边框,内层保留20px圆角及单一边框,解决全局card-surfaces同时装饰两层造成的方框。正常Safari提示、支付接口和结算逻辑不改。用真实模板/样式和空操作按钮隔离预览:跳转提示与按钮正确;二维码分支仍有SVG二维码和扫码说明;外框computed border0、透明,内层border1px/radius20px。截图共享仓库codex/output/hn-payment-modal-20261030/redirect.png及qr.png。无订单或支付商请求,临时预览已移除。未提交/发布。
|
||||
|
||||
### 管理员专属套餐(2026-10-30,仅本地)
|
||||
|
||||
用户已明确批准具体XB核心变更,管理员专属16元110GB/月套餐及权限实施、隔离测试与回退唯一正文见[HN_ADMIN_PLAN](HN_ADMIN_PLAN.md);普通用户不得仅靠隐藏前端保护。未发布线上。
|
||||
|
||||
支付跳转提示最终按用户2026-10-30指定改为“请在收银台扫描二维码完成支付”,删除后半段;扫码型原提示保留。用户同轮明确授权发布本次支付弹窗修复及此前已批准的管理员专属套餐,实际发布状态以HN_PRODUCTION收据为准。
|
||||
@@ -2,6 +2,66 @@
|
||||
|
||||
文档核对日期:2026-10-11。以下区分本会话检查结果与用户验收确认,不承诺服务器一直保持此状态。
|
||||
|
||||
## HN 订阅域名改为 t34(2026-10-28,服务器侧验收完成)
|
||||
|
||||
用户指定后,新入口为t34.hardnerd-nodes.com,旧c2 DNS已移除;HN subscribe_url、生成链接、源站/容器TLS与SNI、独立续期同步。有效限时账号两种格式200、无效令牌403、非订阅404、CF DYNAMIC/no-store、证书续期及HN专用hook通过,QA ID4已禁用和轮换令牌。DPL/FUC原容器和配置基线保持,未改节点、邮箱或认证;节点联网不属于本次验收。实现、版本及回退见 [HN_MAIL_GATEWAY](HN_MAIL_GATEWAY.md)。未做线上页面验收。
|
||||
|
||||
## HN 首次线上部署(2026-10-27,服务器侧验收完成)
|
||||
|
||||
用户指定 sitejp02、主域名 hardnerd.net,已使用独立数据库和 EZ 上线;后台 admin.hardnerd.net,默认管理员已创建并验证。Git功能提交2e5cec6已推送HN专用分支并在服务器部署;Cloudflare代理/严格HTTPS、源站证书、前后台及权限通过,唯一验收会话已撤销。DPL提交/既有Nginx配置/原服务启动时间不变,DPL公网200。未做线上页面验收;套餐、节点及支付未配置。邮件及辅助域名随后已接通,见下节。具体服务、证据、恢复与限制见 [HN_PRODUCTION](HN_PRODUCTION.md)。下文“未推送/部署”是各历史阶段当时状态,不代表当前HN尚未部署。
|
||||
|
||||
## HN 邮件与独立订阅网关(2026-10-27,服务器侧验收完成)
|
||||
|
||||
mail@hardnerd.dev 的SMTP465/IMAP993及Resend独立账号已接通,两封实际测试邮件收件及SPF/DKIM通过;Resend实际回调200、已投递时间入库,IMAP入库2封,自身邮件不自动回复。来信自动回复已启用但未发送额外外部测试;管理员运行汇报未借用DPL目的地。c2.hardnerd-nodes.com 经Cloudflare严格TLS转发到独立HN网关,Clash/sing-box格式、鉴权、no-store及非订阅拒绝通过;限时QA账号已禁用、令牌轮换。证书续期模拟通过,原DPL/FUC容器及Nginx配置基线不变。没有可运营套餐/节点,未测真实付款、实际代理联网或线上页面。sitejp02收尾核实19:50:52发生过整机启动,原服务随系统重启,首发启动时间基线已变化;原因未核实,当前全active、DPL代码和Nginx配置不变且公网200。配置、证据、版本与回退见 [HN_MAIL_GATEWAY](HN_MAIL_GATEWAY.md)。
|
||||
|
||||
## admin.hn.loc 本地后台入口(2026-10-27,已启用)
|
||||
|
||||
按用户要求新增独立后台域名admin.hn.loc,根路径内部映射现有管理应用,资源与API同源,双回环监听。浏览器登录页显示正常、无警告错误;管理HTML/8项资源200,真实管理员接口登录及权限200、访客403,仅撤销本次新增验收会话。hn.loc/dpl.loc回归200,原hn.loc配置未变;未改账号、认证或线上。备份与回退见 [SITE_PROFILES](SITE_PROFILES.md)。公告与商城须知为独立逻辑,代码核对结果也归入该正文,未发布测试公告。
|
||||
|
||||
## HN 购买套餐页精简(2026-10-27,已本地验证)
|
||||
|
||||
中文商店入口/标题已改为购买套餐;进入须知弹窗及四张宣传卡片通过HN适配配置关闭。上游子模块与dpl未改。浏览器验证从仪表盘进入、套餐/购买按钮、一次性筛选与重置均正常,未见弹窗/四卡或控制台警告错误;EZ配置测试通过。没有创建订单或付款,未构建、提交、推送或部署。实现与备份入口见 [SITE_PROFILES](SITE_PROFILES.md)。
|
||||
|
||||
## hn 本地默认管理员(2026-10-27,已创建并验证)
|
||||
|
||||
按用户要求核对ACC-005字段与目标独立SQLite:默认账号原先不存在,在线备份后经项目官方注册方法创建为用户ID3、有效管理员,未覆盖原用户密码。正常HTTP登录200且is_admin=true;受限管理接口200、访客403;唯一验收会话已撤销。浏览器确认本地后台登录界面正常,未在浏览器登录/保存密码。管理员入口、凭据引用和备份在 [SITE_PROFILES](SITE_PROFILES.md) 维护。只操作hn本地实例,未改dpl、认证策略或线上数据。
|
||||
|
||||
## hn.loc 本地入口(2026-10-27,已启用)
|
||||
|
||||
按用户要求新增固定域名 `http://hn.loc/`,仅双回环hosts与Nginx入口,普通请求到独立PHP8592,EZ同源开发资源与HMR到5184,Redis6387/SQLite演示库保持独立。开发服务已运行,未新增开机登录项。PHP直接使用/usr/local/bin/php,避免artisan误选不可执行的Herd链接。root安装脚本在文稿路径被macOS拒绝时未改权限,改从私有临时目录通过正常管理员授权安装;未放宽TCC。
|
||||
|
||||
浏览器实际显示 hardnerd EZ 深色首页,Vite WebSocket connected,无警告/错误;解析仅127.0.0.1与::1,HTML、开发client/main.js、Logo、公开配置接口均200;既有dpl.loc/home.loc均200。14项站点回归/31断言与1项EZ配置测试通过。未登录或写入业务、未重建、未提交推送/部署。备份、启动和回退见 [SITE_PROFILES](SITE_PROFILES.md)。tpl-a未修改。
|
||||
|
||||
## hn 当前使用 EZ(2026-10-27)
|
||||
|
||||
用户决定 hn 先使用 EZ。独立工作树的 `config/site.php` 默认值、`SiteProfile` 和资源发布脚本回退值、`.env.hn.example` 均已改为 EZ;本地 `.env` 已是 `SITE_PROFILE=hn` 且未覆盖 `SITE_THEME`,因此沿用 EZ。未改私密环境、数据库或缓存;Hardnerd 功能草稿保留为显式选项,tpl-a 定稿未修改、未绑定 hn。
|
||||
|
||||
本次站点配置/权限/命名空间回归 14 测试、31 断言通过;EZ 同源接口配置测试 1 项通过,PHP 语法与 `git diff --check` 通过。本次没有修改界面或重新构建资源,没有启动/切换预览服务,也未做新的浏览器验收。未合入 dpl 主项目、未提交本次改动、未推送或部署;线上仍未登记可执行的 hn 部署目标。历史设计预览与旧功能验收见下文,不代表本次上线。
|
||||
|
||||
## tpl-a 设计定稿保留(2026-10-14,未绑定业务实例)
|
||||
|
||||
用户确认当前效果可作为定稿方案保留,命名 tpl-a,不限定用于 hn;仅保存纯前端设计,吉祥物暂缓。最新要求明确“机房网络运营商”定位、解除此前扁平 SVG 限制并重新设计。当前 `frontends/tpl-a/` 首页改为写实机柜通道主视觉;接入方案、控制台及其他服务门户页面已统一重做,旧卡通机架 / 格纹 / 厚框眼镜 / 终端装饰已退出当前视觉。默认暗色、可切浅色,减少无关小字的要求保留。端口 8591 继续为独立 Vite 静态前端。
|
||||
|
||||
当前版本已验证 1280px 明暗首页、接入方案与控制台;390px 七类门户页面无横向溢出,320px 首页、菜单和控制台无溢出。月 / 年付展示、方案选择、页面跳转、主题切换与模拟保存可用,浏览器没有运行错误。观察到的 11 个请求均留在本机 Vite,没有业务 API;源码无后端代理。构建与格式检查通过。机房影像为内置 imagegen 生成示意,价格、地区、线路、账户、流量和记录为演示,不据此声称实际机房资产或资源已验收。tpl-a 源码与素材已独立提交为 8b78424;未推送、部署,没有修改实际 dpl 环境或业务数据库。启动、源码、证据与限制见 [THEME_DESIGNS](THEME_DESIGNS.md)。
|
||||
|
||||
## Hardnerd 功能草稿(2026-10-14,暂缓接入与验收)
|
||||
|
||||
用户要求重新设计与 EZ / Stellar 均不同的 hn 专属主题。当前工作树切到 `codex/hn-custom-theme`,自有源码在 `frontends/hardnerd/`,主题包装 `theme/Hardnerd/`,独立热更新端口 5175。该历史草稿当时默认 Hardnerd;2026-10-27 已按用户要求改为默认 EZ,Hardnerd 保留为显式选项;dpl 选择不受该参数影响。当前改动尚未提交、推送或部署,不能视作正式发布。
|
||||
|
||||
已实际显示首页和用户中心,虚构本地用户登录、套餐列表/确认、创建一笔本地待支付测试订单(未付款、未开通)已验证。新增主题/隔离回归 14 测试 / 31 断言、前台金额/流量/接口凭据 7 测试通过,构建通过。其余页面交互、手机断点、正式资源验收和最终文档仍需继续。原生取消确认在浏览器验证时阻塞,已改为主题内 dialog,尚待验证。没有修改实际 dpl 环境和业务数据库。
|
||||
|
||||
以上记录属于此前功能草稿,不代表当前静态设计稿已经接入业务。用户已要求吉祥物先搁置,概念图没有批准或接入。后续须先确定视觉,再继续功能主题验收。
|
||||
|
||||
## hn / EZ 本地实现(2026-10-13)
|
||||
|
||||
独立工作树 `/Users/hellcat/Documents/Codex/2026-10-12/ji-cha/work/dpl-hn`,分支 `codex/hn-site-profile`,基于后端 `99f9b9ec927d924ce48f4bf6835a7edf604dcf46`。共享代码由 SITE_PROFILE 区分 dpl / hn,hn 使用锁定 EZ 源码和自有品牌,部署边界见 [SITE_PROFILES](SITE_PROFILES.md)。运行中的 dpl 后端、Stellar、实际 .env、数据库、Redis、队列、代理和生产服务器均未修改;主工作区既有修改保留。
|
||||
|
||||
本地隔离环境使用工作树 SQLite 和专用 Redis 6387,虚构用户、管理员和套餐。浏览器已验证 EZ 首页、登录、用户中心、套餐列表 ¥19/月及结算摘要;后台显示 EZ 为当前主题,切换 Xboard 返回部署配置限制,EZ 保持当前。已验证 dev 资源和正式构建资源加载;未提交真实订单、未付款、未发信、未连接实际节点。
|
||||
|
||||
验证:新增站点/权限/参数/命名空间 10 测试 / 26 断言通过;EZ 配置测试通过,npm build:hn 构建通过;既有支付/邮件 65 测试 / 386 断言,订单并发单独进程 4 测试 / 13 断言通过。最初合并运行订单套件遭遇精简 user schema 的 Eloquent 静态字段缓存干扰,分进程复核通过,业务模型未为测试改写。PHP 语法和 git diff --check 通过。
|
||||
|
||||
实现与文档当前仅在本地分支;未推送、未部署、未验证正式域名/白色机反代。hn 生产服务器、独立数据库、管理员、邮件、支付、订阅和节点资源尚未指定或验收,不能把本地完成解释为上线完成。无业务迁移新增,dpl 发布需单独授权和验收。
|
||||
|
||||
## 2026-10-21 剩余合格节点接入完成
|
||||
|
||||
新增us02/vn01/ru01展示US - 04、HK - 07、RU - 01,已接23台;hk02现场小于1GB且运行XrayR,按组合规则排除。三台完整隔离联网/各自出口/双向上报和助手独立审查通过,QA禁用403/排除;正式动态23节点结构/密码/权限及严格TLS通过。旧服务、既有业务及四容器保持,新三证书续期演练通过。RU实际保护SSH/DNS且使用已验证隔离Certbot2.11与既有certbot.timer,未假造XrayR/Snap。
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# 自有主题设计方案与预览
|
||||
|
||||
## 当前范围与定稿
|
||||
|
||||
2026-10-14,用户确认当前效果可作为定稿方案保留,命名为 `tpl-a`,不限定用于 hn。当前独立源码在 `frontends/tpl-a/`,设计定稿版本 1.0.0;业务接入仍未完成。2026-10-27 用户确定 hn 先使用 EZ;tpl-a 仍不绑定 hn,吉祥物暂缓。此前接入业务接口的 `frontends/hardnerd/` 功能草稿,以及 EZ / Stellar 独立保留。
|
||||
|
||||
用户最新明确定位为“机房网络运营商”,解除此前 2D 扁平 / SVG 风格限制并要求重新设计。当前首页采用写实机柜通道主视觉、网络接入 / 套餐 / 技术服务入口与运营管理内容;接入方案、控制台、资源、账单、文档、工单和账户页面均重做为统一服务门户。使用深蓝、暖橙、自然空间影像与常规企业排版,不继续沿用卡通机架、格子衫 / 厚眼镜和终端装饰作为主视觉。保留减少无关小字的要求,只在全站一处注明影像和数据为示意。明暗双色保留,初次加载默认暗色。
|
||||
|
||||
所有价格、参数、地区、节点、账户、流量与订单均为演示,年付展示按演示月价 × 12 计算。机房主图通过内置 imagegen 生成,不是 hn 实际机房照片;不据此认定机房资产、实际覆盖或可用性承诺。表单与按钮只切换视觉状态和提示,不提交业务数据、不发邮件、不创建订单或工单。
|
||||
|
||||
设计源文件和素材已以本地 Git 提交 `8b78424` 保存;关联业务草稿与环境未纳入该提交。
|
||||
|
||||
## 开发入口
|
||||
|
||||
在独立工作树启动:
|
||||
|
||||
```bash
|
||||
npm --prefix frontends/tpl-a run dev
|
||||
```
|
||||
|
||||
预览:`http://127.0.0.1:8591/#/home`。该端口当前由 Vite 直接提供静态前端;原先占用该端口的 hn PHP 演示进程已停止。配置 `envDir:false`,没有后端代理,不加载 Laravel 配置或业务数据库。只监听本机回环地址。
|
||||
|
||||
主要源码:
|
||||
|
||||
- `src/NetworkLanding.vue`:写实机房首页、网络接入、套餐与服务入口。
|
||||
- `src/App.vue`:导航、明暗切换,以及七类用户中心页面的模拟交互。
|
||||
- `src/brand.mjs`:可替换的演示品牌;`template.json` 的 site_binding 为 null。
|
||||
- `approved-files.sha256.json`:定稿源码与素材摘要;运行和定稿保护见方案 README。
|
||||
- `src/operator.css`:完整企业官网和服务门户样式、明暗与响应式布局;旧 style.css 已退出使用并移除。
|
||||
- `public/datacenter-hero-v1.png`:已落入项目的写实主视觉,原始生成文件另行保留。生成方式与完整提示词在 `codex/output/hn-datacenter-asset.md`。
|
||||
|
||||
构建验证:在仓库根运行 `npm --prefix frontends/tpl-a run build`,输出仅在 `frontends/tpl-a/dist/`。**该构建不会发布到 `theme/Hardnerd` 或运行中的 dpl;不能使用 hn 正式资源发布脚本将本设计稿误当作功能主题。**
|
||||
|
||||
## 本次验证与限制
|
||||
|
||||
- 首页、用户中心、套餐、节点、订单、说明、工单、账户均能前端跳转;保存偏好只显示模拟提示。
|
||||
- 默认暗色与浅色切换已在浏览器验证。
|
||||
- 当前机房运营商方向已在 1280px 宽屏验证明暗首页、接入方案和控制台;390px 七类门户页面逐页检查无横向溢出,320px 首页、菜单与控制台无溢出。临时浏览器尺寸已恢复。
|
||||
- 月付 / 年付展示切换、方案选择和账户模拟保存已验证,仅作用于前端状态。
|
||||
- 浏览器观察到的首页资源、页面跳转与模拟保存请求全部留在本机 Vite;未出现业务 API 请求。源码无 fetch / Axios / XHR 和后端 proxy。
|
||||
- 构建与差异格式检查通过,浏览器没有运行错误。当前截图为 `codex/output/hn-dc-*.jpg`;`hn-hard-*` / `hn-operator-*` 为此前版本对照,均不作为定稿素材。
|
||||
- 项目维护记录和 CoDocs hn/dpl 入口已同步。CoDocs 全库结构检查仍报告 13 项既有 Obsidian 主题目录/文件权限问题;本任务未改动这些无关配置,不能称全库检查通过。
|
||||
- 设计已由用户批准保存为 tpl-a;未推送、部署,hn 已选 EZ,tpl-a 使用实例仍未定。业务接入、支付、邮件、订阅、节点连通与生产验收没有在本阶段执行。
|
||||
|
||||
后续明确使用实例后,再将 tpl-a 接入功能主题,分别进行业务接入和部署验收。实例隔离和历史功能验证见 [SITE_PROFILES](SITE_PROFILES.md) 与 [STATUS](STATUS.md)。
|
||||
@@ -0,0 +1,27 @@
|
||||
# Xboard 主题生态调查
|
||||
|
||||
核对日期:2026-10-14。仅依据本次读取的上游、作者仓库和作者文档;不是官方完整目录、购买建议或本项目适配验收。第三方主题的可购买性、授权和 Xboard 版本支持须在实际采用前核对。
|
||||
|
||||
## 已找到的主要项目
|
||||
|
||||
| 名称 / 作者 | 本次证据与获取状态 | 一手来源 |
|
||||
| --- | --- | --- |
|
||||
| Xboard 默认主题 | 官方 master 的 theme/ 目录内置 Xboard | [官方目录](https://github.com/cedar2025/Xboard/tree/master/theme) |
|
||||
| EZ THEME / EZTHEME | 公开源码,作者声明适配 V2Board / XBoard / wyxBoard;本项目以前适配的是这个仓库 | [作者仓库](https://github.com/EZTHEME/EZ_THEME) |
|
||||
| EZ-Theme / PangHu-Code | 与上一项名称相近的另一项目;Vue 3,README 标注 MIT,明确提供 Xboard API 配置 | [作者仓库](https://github.com/PangHu-Code/EZ-Theme) |
|
||||
| Stellar Theme | 公开源码,README 明确支持 cedar2025/Xboard 与 wyx2685/v2board | [项目仓库](https://github.com/aklibk86-dev/stellar) |
|
||||
| DK Theme | React / Vite / TypeScript,作者声明 XBoard / V2Board 适配,MIT | [作者仓库](https://github.com/Nice-Derrick/DK_Theme) |
|
||||
| Aurora | 作者公开发布包(static、config.json、Blade);仓库含 Xboard 标签,README 主要面向 V2Board。具体授权与版本支持需确认 | [作者发布仓库](https://github.com/krsunm/Aurora) |
|
||||
| AirRocket / Rocket | 作者 README 明确列 Xboard;仓库目前主要是介绍,提供授权购买入口,不能因仓库摘要写免费就认为当前产品免费开源 | [作者仓库](https://github.com/dc8683/v2board-theme-airrocket) |
|
||||
| Zero Theme | 作者配置文档允许 v2board_version=xboard,含购买授权令牌字段 | [作者文档](https://linkis-organization.gitbook.io/v2boar-zero-theme/shi-yong-jiao-cheng/zhu-ti-pei-zhi) |
|
||||
| Lucid | 作者频道介绍 Bento Grid 与商业域名授权,声明曾在 Xboard 测试;不代表本次已验证当前版本 | [作者频道](https://t.me/s/NEDEFINITA) |
|
||||
| Angela | 作者公开介绍、响应式 / PWA / 扩展点;GitHub 仓库只有 README,含 Xboard 标签,具体交付与适配版本向作者确认 | [作者仓库](https://github.com/Miss-Tea2/Angela) |
|
||||
| Lovesy | 作者介绍 Xboard 前后端分离主题;仓库主要是 README 与截图,未见完整源码 | [作者仓库](https://github.com/devlovesy/xboard-theme-lovesy) |
|
||||
|
||||
同名项目、分支和商业版不自动等价。公开 GitHub 页面可能只是介绍或编译产物,不能一律称为开源。这里只确认项目存在及作者声明;未购买、安装、登录演示后台或测试业务 API。
|
||||
|
||||
## 本地库存与 tpl-a
|
||||
|
||||
本次只读清点:运行中的 dpl 代码目录中,系统主题 Xboard、自定义主题 Stellar 的 config.json 和 dashboard.blade.php 均存在。隔离工作树另有 EZ 与旧 Hardnerd 功能草稿。SYSTEM_THEMES 里的保留名称不代表相应目录已经安装。
|
||||
|
||||
`tpl-a` 是本次用户批准保存的自主设计方案,独立源码 `frontends/tpl-a/`,未绑定 hn,不作为第三方生态项目或已经接入 Xboard 后台的主题计数。其状态与启动入口见 [THEME_DESIGNS](THEME_DESIGNS.md)。
|
||||
@@ -0,0 +1 @@
|
||||
/node_modules/
|
||||
Submodule
+1
Submodule frontends/ez-theme added at 2c0581386d.
@@ -0,0 +1 @@
|
||||
<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>hardnerd</title><link rel="icon" href="/brand/hn/logo.svg"></head><body><div id="app"></div><script type="module" src="/src/main.js"></script></body></html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<script setup>
|
||||
import {ref,watch} from 'vue';import {useRoute,useRouter} from 'vue-router';import Icon from './Icon.vue';import Confirm from './Confirm.vue';import {state,signOut,loadAccount,notify} from './state.mjs';
|
||||
const route=useRoute(),router=useRouter(),open=ref(false);const brand=window.settings?.title||'hardnerd';const logo=window.settings?.logo||'/brand/hn/logo.svg';
|
||||
const nav=[['/dashboard','grid','概览'],['/shop','bag','选择套餐'],['/nodes','network','连接与节点'],['/orders','receipt','我的订单'],['/docs','book','使用指南'],['/tickets','help','工单支持']];
|
||||
watch(()=>route.path,()=>{open.value=false;if(route.meta.auth&&state.token&&!state.user)loadAccount().catch(error=>notify(error.message));},{immediate:true});
|
||||
function skip(){const target=document.getElementById('main');target?.focus();target?.scrollIntoView();}
|
||||
function logout(){signOut();router.push('/');}
|
||||
</script>
|
||||
<template>
|
||||
<a class="skip-link" href="#main" @click.prevent="skip">跳到主要内容</a>
|
||||
<div v-if="route.meta.auth" class="workspace">
|
||||
<button class="mobile-nav" @click="open=!open" :aria-expanded="open" aria-label="打开导航"><Icon :name="open?'close':'menu'"/></button>
|
||||
<aside class="sidebar" :class="{open}"><RouterLink class="brand side-brand" to="/"><img :src="logo" alt=""/><span>{{brand}}</span><span class="word-dot">NET</span></RouterLink><span class="nav-label">YOUR SPACE / 用户中心</span><nav><RouterLink v-for="[url,icon,label] in nav" :key="url" :to="url" :class="{'router-link-active':(url==='/shop'&&route.path==='/order-confirm')||(url==='/orders'&&route.path==='/payment')}"><Icon :name="icon"/><span>{{label}}</span><span class="nav-pointer">↗</span></RouterLink></nav><div class="side-bottom"><RouterLink class="invite-link" to="/invite"><Icon name="spark"/> 好连接,值得分享 <span>↗</span></RouterLink><RouterLink class="identity" to="/profile"><span class="avatar">{{(state.user?.email||'H').slice(0,1).toUpperCase()}}</span><span><b>我的账户</b><small>{{state.user?.email||'正在读取…'}}</small></span><Icon name="user"/></RouterLink><button class="logout" @click="logout"><Icon name="logout"/>退出登录</button><small class="side-footer">{{brand}} · CONNECT DIFFERENT.</small></div></aside>
|
||||
<div class="work-main"><header class="work-top"><span class="mono">WORKSPACE <span class="slash">/</span> {{state.user?.email?.split('@')[0]||'hardnerd'}}</span><RouterLink class="top-help" to="/tickets"><span class="tiny-dot"></span>需要帮助?<Icon name="arrow"/></RouterLink></header><main id="main" tabindex="-1"><RouterView/></main><footer class="work-footer"><span>© {{new Date().getFullYear()}} {{brand}}</span><span>保持好奇。保持连接。</span><RouterLink to="/docs">使用指南 ↗</RouterLink></footer></div></div>
|
||||
<RouterView v-else/>
|
||||
<Confirm v-if="state.confirm"/><div v-if="state.toast" class="toast" role="status"><Icon name="help"/><span>{{state.toast}}</span><button @click="state.toast=''" aria-label="关闭提示"><Icon name="close"/></button></div>
|
||||
</template>
|
||||
@@ -0,0 +1,9 @@
|
||||
<script setup>
|
||||
import {ref,onMounted,onBeforeUnmount} from 'vue';import {state} from './state.mjs';
|
||||
const container=ref(null),error=ref('');let widget=null,sdk=null,token='';
|
||||
function loadScript(url){return new Promise((resolve,reject)=>{const existing=document.querySelector(`script[data-hn-captcha="${url}"]`);if(existing){if(existing.dataset.ready)return resolve();existing.addEventListener('load',resolve,{once:true});existing.addEventListener('error',()=>reject(new Error('验证服务未加载,请重试')),{once:true});return;}const script=document.createElement('script');script.src=url;script.async=true;script.dataset.hnCaptcha=url;script.onload=()=>{script.dataset.ready='true';resolve();};script.onerror=()=>reject(new Error('验证服务未加载,请重试'));document.head.append(script);});}
|
||||
onMounted(async()=>{if(!state.config.is_captcha)return;try{const type=state.config.captcha_type;if(type==='turnstile'){await loadScript('https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit');sdk=window.turnstile;widget=sdk.render(container.value,{sitekey:state.config.turnstile_site_key,callback:value=>token=value,'expired-callback':()=>token=''});}else if(type==='recaptcha'){await loadScript('https://www.google.com/recaptcha/api.js?render=explicit');await new Promise(resolve=>window.grecaptcha.ready(resolve));sdk=window.grecaptcha;widget=sdk.render(container.value,{sitekey:state.config.recaptcha_site_key,callback:value=>token=value,'expired-callback':()=>token=''});}else if(type==='recaptcha-v3'){await loadScript('https://www.google.com/recaptcha/api.js?render='+encodeURIComponent(state.config.recaptcha_v3_site_key));await new Promise(resolve=>window.grecaptcha.ready(resolve));sdk=window.grecaptcha;}else throw new Error('当前验证方式暂不支持,请联系支持');}catch(e){error.value=e.message;}});
|
||||
async function payload(){if(!state.config.is_captcha)return {};if(error.value)throw new Error(error.value);const type=state.config.captcha_type;if(type==='recaptcha-v3'){if(!sdk)throw new Error('验证服务正在加载');token=await sdk.execute(state.config.recaptcha_v3_site_key,{action:'register'});}if(!token)throw new Error('请先完成人机验证');return {[type==='turnstile'?'turnstile_token':type==='recaptcha-v3'?'recaptcha_v3_token':'recaptcha_data']:token};}
|
||||
function reset(){token='';if(sdk&&widget!==null)sdk.reset(widget);}
|
||||
onBeforeUnmount(()=>{if(sdk&&widget!==null&&state.config.captcha_type==='turnstile')sdk.remove(widget);});defineExpose({payload,reset});
|
||||
</script><template><div v-if="state.config.is_captcha" class="captcha"><div ref="container"></div><p v-if="error" role="alert">{{error}}</p></div></template>
|
||||
@@ -0,0 +1,6 @@
|
||||
<script setup>
|
||||
import {ref,onMounted} from 'vue';import {state} from './state.mjs';
|
||||
const dialog=ref(null);
|
||||
function finish(value){const resolve=state.confirm?.resolve;state.confirm=null;resolve?.(value);}
|
||||
onMounted(()=>dialog.value.showModal());
|
||||
</script><template><dialog ref="dialog" class="confirm-dialog" aria-labelledby="hn-confirm-title" @cancel.prevent="finish(false)"><span class="eyebrow">BEFORE YOU CONTINUE</span><h2 id="hn-confirm-title">确认操作</h2><p>{{state.confirm?.message}}</p><div class="form-actions"><button class="button outline" @click="finish(false)" autofocus>返回</button><button class="button primary" @click="finish(true)">确认</button></div></dialog></template>
|
||||
@@ -0,0 +1,5 @@
|
||||
<script setup>
|
||||
defineProps({name:String});
|
||||
const paths={arrow:'M5 12h14m-6-6 6 6-6 6',grid:'M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z',network:'M12 3v6m-7 9v-5h14v5M12 13v5M9 3h6v4H9zM2 18h6v4H2zM9 18h6v4H9zM16 18h6v4h-6z',bag:'M5 8h14l1 13H4L5 8Zm3 0V6a4 4 0 0 1 8 0v2',receipt:'M5 3h14v18l-3-2-4 2-4-2-3 2V3Zm4 5h6M9 12h6',user:'M16 7a4 4 0 1 1-8 0 4 4 0 0 1 8 0ZM4 21v-3a8 8 0 0 1 16 0v3',help:'M21 11a9 9 0 0 1-9 9H4l-2 2V11a9 9 0 0 1 19 0ZM8 8a4 4 0 0 1 7 2c0 2-3 2-3 4m0 3h.01',book:'M3 4h7l2 2 2-2h7v16h-7l-2 1-2-1H3V4Zm9 2v15',logout:'M9 4H3v16h6m5-14 6 6-6 6m6-6H8',copy:'M8 8h12v12H8zM4 16H2V2h14v2',check:'m5 12 4 4L20 5',plus:'M12 4v16M4 12h16',refresh:'M20 8a8 8 0 1 0 1 7m-1-12v5h-5',menu:'M3 6h18M3 12h18M3 18h18',close:'m5 5 14 14M19 5 5 19',globe:'M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM3 12h18M12 3c-5 5-5 13 0 18 5-5 5-13 0-18',spark:'m12 2 3 7 7 3-7 3-3 7-3-7-7-3 7-3 3-7',shield:'m12 2 9 4v6c0 5-9 10-9 10S3 17 3 12V6l9-4Zm-4 10 3 3 5-6'};
|
||||
</script>
|
||||
<template><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path :d="paths[name]||paths.arrow"/></svg></template>
|
||||
@@ -0,0 +1,8 @@
|
||||
export const periods={month_price:'月付',quarter_price:'季付',half_year_price:'半年付',year_price:'年付',two_year_price:'两年付',three_year_price:'三年付',onetime_price:'一次性',reset_price:'重置流量'};
|
||||
export function money(cents=0){return (Number(cents||0)/100).toFixed(2);}
|
||||
export function bytes(value=0){const size=Number(value||0);if(size===0)return '0 B';const index=Math.min(4,Math.floor(Math.log(Math.max(1,size))/Math.log(1024)));return `${(size/1024**index).toFixed(index?1:0)} ${['B','KB','GB','TB','PB'][index]}`;}
|
||||
export function date(value){return value?new Date(Number(value)*1000).toLocaleDateString('zh-CN'):'—';}
|
||||
export function planPeriods(plan){return Object.keys(periods).filter(key=>key!=='reset_price'&&plan[key]!=null&&Number.isFinite(Number(plan[key])));}
|
||||
export function usage(subscription){const total=Number(subscription?.transfer_enable||0),used=Number(subscription?.u||0)+Number(subscription?.d||0);return {total,used,remaining:Math.max(0,total-used),percent:total>0?Math.min(100,Math.max(0,used/total*100)):0};}
|
||||
export function safeLink(value,origin){try{const url=new URL(value,origin);return ['http:','https:'].includes(url.protocol)?url.href:null;}catch{return null;}}
|
||||
export function statusLabel(status){return ['待支付','处理中','已取消','已完成','已折抵'][Number(status)]||'未知状态';}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
import {createApp} from 'vue';
|
||||
import {createRouter,createWebHashHistory} from 'vue-router';
|
||||
import App from './App.vue';
|
||||
import Home from './pages/Home.vue';
|
||||
import Auth from './pages/Auth.vue';
|
||||
import Dashboard from './pages/Dashboard.vue';
|
||||
import Plans from './pages/Plans.vue';
|
||||
import Orders from './pages/Orders.vue';
|
||||
import Account from './pages/Account.vue';
|
||||
import Resources from './pages/Resources.vue';
|
||||
import {state,signOut,notify,api} from './state.mjs';
|
||||
import './style.css';
|
||||
const routes=[{path:'/',component:Home},{path:'/landing',redirect:'/'},...['login','register','forgot-password'].map(path=>({path:'/'+path,component:Auth})),{path:'/dashboard',component:Dashboard,meta:{auth:true}},{path:'/shop',component:Plans,meta:{auth:true}},{path:'/order-confirm',component:Plans,meta:{auth:true}},{path:'/payment',component:Orders,meta:{auth:true}},{path:'/orders',component:Orders,meta:{auth:true}},{path:'/profile',component:Account,meta:{auth:true}},...['nodes','tickets','docs','invite'].map(path=>({path:'/'+path,component:Resources,meta:{auth:true}})),{path:'/:pathMatch(.*)*',redirect:'/'}];
|
||||
const router=createRouter({history:createWebHashHistory(),routes,scrollBehavior:()=>({top:0})});
|
||||
router.beforeEach(to=>{if(to.meta.auth&&!state.token)return {path:'/login',query:{redirect:to.fullPath}};document.title=(to.path==='/'?'连接不止于此':({'order-confirm':'确认订单',payment:'订单支付','forgot-password':'找回密码',dashboard:'概览',shop:'套餐',orders:'订单',profile:'账户',tickets:'支持',docs:'指南',nodes:'节点',invite:'邀请',login:'登录',register:'注册'}[to.path.slice(1)]||'hardnerd'))+' · '+(window.settings?.title||'hardnerd');});
|
||||
window.addEventListener('hardnerd-expired',()=>{notify('登录已过期,请重新登录');router.replace('/login');});
|
||||
api('/guest/comm/config').then(config=>(state.config=config||{},state.configReady=true)).catch(error=>{state.configError=true;notify(error.message);});
|
||||
createApp(App).use(router).mount('#app');
|
||||
@@ -0,0 +1,8 @@
|
||||
<script setup>
|
||||
import {ref,onMounted} from 'vue';import Icon from '../Icon.vue';import {state,api,action,loadAccount,copy,askConfirmation} from '../state.mjs';import {money,date} from '../core.mjs';
|
||||
const oldPassword=ref(''),newPassword=ref(''),again=ref(''),expire=ref(true),traffic=ref(true),sessions=ref([]),error=ref('');
|
||||
async function load(){try{await loadAccount();expire.value=!!state.user.remind_expire;traffic.value=!!state.user.remind_traffic;sessions.value=await api('/user/getActiveSession')||[];}catch(e){error.value=e.message;}}onMounted(load);
|
||||
async function save(){await action(()=>api('/user/update',{method:'POST',data:{remind_expire:expire.value?1:0,remind_traffic:traffic.value?1:0}}),'提醒偏好已保存');}
|
||||
async function change(){await action(async()=>{if(newPassword.value!==again.value)throw new Error('两次新密码不一致');await api('/user/changePassword',{method:'POST',data:{old_password:oldPassword.value,new_password:newPassword.value}});oldPassword.value='';newPassword.value='';again.value='';await load();},'密码已更新');}
|
||||
async function revoke(session){if(!await askConfirmation('确认退出这台设备?'))return;await action(async()=>{await api('/user/removeActiveSession',{method:'POST',data:{session_id:session.id}});await load();},'设备会话已退出');}
|
||||
</script><template><section class="page-heading"><div><span class="eyebrow">04 / MAKE YOURSELF AT HOME</span><h1>你的空间,你作主<span class="lime-dot">.</span></h1><p>账户信息、提醒偏好与登录设备。</p></div><span class="number-tag">HN / ACCOUNT</span></section><p v-if="error" class="error-note" role="alert">{{error}}</p><div class="account-grid"><section class="panel account-profile"><span class="avatar large">{{(state.user?.email||'H').slice(0,1).toUpperCase()}}</span><h2>{{state.user?.email?.split('@')[0]||'探索者'}}</h2><p class="muted email">{{state.user?.email||'正在读取…'}}</p><span class="account-tag">HARDNERD MEMBER</span><div class="profile-detail"><span>加入时间</span><b>{{date(state.user?.created_at)}}</b></div><div class="profile-detail"><span>账户余额</span><b>¥{{money(state.user?.balance)}}</b></div><div class="profile-detail"><span>上次登录</span><b>{{date(state.user?.last_login_at)}}</b></div><RouterLink to="/invite" class="button outline full"><Icon name="spark"/>邀请好友</RouterLink></section><div class="account-settings"><section class="panel"><div class="panel-title"><h2>消息提醒</h2><span class="mono">PREFERENCES</span></div><form @submit.prevent="save"><label class="toggle-row"><span><b>套餐到期提醒</b><small>接收账户套餐到期相关提醒</small></span><input type="checkbox" role="switch" v-model="expire"/></label><label class="toggle-row"><span><b>流量使用提醒</b><small>接收流量用量相关提醒</small></span><input type="checkbox" role="switch" v-model="traffic"/></label><button class="button dark" :disabled="state.busy||!state.user">保存偏好<Icon name="check"/></button></form></section><section class="panel"><div class="panel-title"><h2>修改密码</h2><span class="mono">SECURITY</span></div><form @submit.prevent="change"><label>当前密码<input v-model="oldPassword" type="password" autocomplete="current-password" required/></label><div class="field-pair"><label>新密码<input v-model="newPassword" type="password" autocomplete="new-password" minlength="8" required/></label><label>确认新密码<input v-model="again" type="password" autocomplete="new-password" minlength="8" required/></label></div><button class="button dark" :disabled="state.busy">更新密码<Icon name="arrow"/></button></form></section><section class="panel"><div class="panel-title"><h2>登录设备</h2><span class="mono">SESSIONS</span></div><p v-if="!sessions.length" class="muted">暂无设备记录。</p><div v-for="session in sessions" :key="session.id" class="session-row"><div><b>{{session.device_info?.device||session.device_info?.browser||'登录设备'}}</b><small>{{date(session.last_used_at?Date.parse(session.last_used_at)/1000:0)}}</small></div><button @click="revoke(session)" class="text-button" :disabled="state.busy">退出此设备 ↗</button></div></section></div></div></template>
|
||||
@@ -0,0 +1,15 @@
|
||||
<script setup>
|
||||
import {ref,computed,watch,onMounted} from 'vue';import {useRoute,useRouter} from 'vue-router';import Icon from '../Icon.vue';import Captcha from '../Captcha.vue';import {state,api,signIn,action,notify} from '../state.mjs';
|
||||
const logo=window.settings?.logo||'/brand/hn/logo.svg';
|
||||
const route=useRoute(),router=useRouter(),email=ref(''),password=ref(''),again=ref(''),code=ref(''),invite=ref(String(route.query.code||'')),remember=ref(false),agreed=ref(false),captcha=ref(null),sending=ref(false),countdown=ref(0);let interval;
|
||||
const mode=computed(()=>route.path.slice(1)),isLogin=computed(()=>mode.value==='login'),isForgot=computed(()=>mode.value==='forgot-password');const title=computed(()=>isLogin.value?'回来,继续探索。':isForgot.value?'找回你的连接。':'很高兴,认识你。');
|
||||
watch(()=>route.path,()=>{password.value='';again.value='';code.value='';captcha.value?.reset();});
|
||||
import {onBeforeUnmount} from 'vue';onBeforeUnmount(()=>clearInterval(interval));
|
||||
function destination(){const redirect=String(route.query.redirect||'');return redirect.startsWith('/')&&!redirect.startsWith('//')?redirect:'/dashboard';}
|
||||
async function mailLogin(){if(!email.value){notify('请先填写邮箱');return;}await action(()=>api('/passport/auth/loginWithMailLink',{method:'POST',data:{email:email.value,redirect:'/dashboard'}}),'登录邮件已提交,请检查邮箱');}
|
||||
onMounted(()=>{if(isLogin.value&&route.query.verify)action(async()=>{const data=await api('/passport/auth/token2Login?verify='+encodeURIComponent(route.query.verify));signIn(data.auth_data);router.replace(destination());});});
|
||||
async function reconnect(){await action(async()=>{state.config=await api('/guest/comm/config')||{};state.configReady=true;state.configError=false;});}
|
||||
async function sendCode(){if(!email.value){notify('请先填写邮箱');return;}if(sending.value||countdown.value)return;sending.value=true;try{await api('/passport/comm/sendEmailVerify',{method:'POST',data:{email:email.value,...await captcha.value?.payload()}});notify('验证码已发送,请检查邮箱');countdown.value=60;interval=setInterval(()=>{if(--countdown.value<=0)clearInterval(interval);},1000);}catch(error){notify(error.message);}finally{sending.value=false;captcha.value?.reset();}}
|
||||
async function submit(){await action(async()=>{if(!isLogin.value&&password.value!==again.value)throw new Error('两次密码不一致');if(!isLogin.value&&!isForgot.value&&state.config.tos_url&&!agreed.value)throw new Error('请先阅读并同意服务条款');if(isLogin.value){const data=await api('/passport/auth/login',{method:'POST',data:{email:email.value,password:password.value}});signIn(data.auth_data,remember.value);router.push(destination());}else if(isForgot.value){await api('/passport/auth/forget',{method:'POST',data:{email:email.value,password:password.value,email_code:code.value}});notify('密码已更新,请登录');router.push('/login');}else{const data=await api('/passport/auth/register',{method:'POST',data:{email:email.value,password:password.value,email_code:code.value,invite_code:invite.value,...await captcha.value?.payload()}});signIn(data.auth_data);router.push('/dashboard');}});if(!isLogin.value)captcha.value?.reset();}
|
||||
</script>
|
||||
<template><div class="auth-layout"><aside class="auth-art"><RouterLink to="/" class="brand"><img :src="logo" alt=""/>hardnerd<sup>NET</sup></RouterLink><span class="eyebrow">A SPACE FOR THE CURIOUS.</span><div class="auth-slogan">世界很大。<br/>你的连接,<br/>可以<span>更远。</span></div><div class="auth-diagram" aria-hidden="true"><div class="diagram-ring"></div><span>HN</span><i></i><b>↗</b></div><div class="mono">STAY CURIOUS. / CONNECT DIFFERENT.</div></aside><main id="main" class="auth-main" tabindex="-1"><RouterLink to="/" class="auth-back">← 回到首页</RouterLink><div class="auth-form"><span class="eyebrow">{{isLogin?'WELCOME BACK':isForgot?'START AGAIN':'HELLO, HARDNERD.'}}</span><h1>{{title}}</h1><p class="muted">{{isLogin?'登录你的 hardnerd 空间。':isForgot?'通过邮箱验证码重设密码。':'用一个账户,开始新的连接。'}}</p><p v-if="state.configError" class="error-note">站点设置暂未加载。<button class="text-button" @click="reconnect">重新连接 ↗</button></p><form @submit.prevent="submit"><label>邮箱<input v-model="email" type="email" autocomplete="email" placeholder="[email protected]" required/></label><label>{{isForgot?'新密码':'密码'}}<input v-model="password" type="password" :autocomplete="isLogin?'current-password':'new-password'" :minlength="isLogin?1:8" placeholder="请输入密码" required/></label><label v-if="!isLogin">确认密码<input v-model="again" type="password" autocomplete="new-password" minlength="8" placeholder="再次输入密码" required/></label><label v-if="!isLogin&&(state.config.is_email_verify||isForgot)">邮箱验证码<div class="input-action"><input v-model="code" inputmode="numeric" maxlength="6" pattern="[0-9]{6}" required placeholder="6 位验证码"/><button type="button" :disabled="sending||countdown>0||!state.configReady" @click="sendCode">{{countdown?countdown+' 秒':sending?'发送中…':'发送验证码'}}</button></div></label><label v-if="!isLogin&&!isForgot">邀请码<span class="muted">{{state.config.is_invite_force?'(必填)':'(可选)'}}</span><input v-model="invite" :required="!!state.config.is_invite_force" placeholder="如果朋友邀请了你"/></label><Captcha v-if="!isLogin&&state.configReady" :key="mode" ref="captcha"/><div class="auth-options" v-if="isLogin"><label class="checkbox"><input v-model="remember" type="checkbox"/>记住这次登录</label><RouterLink to="/forgot-password">忘记密码?</RouterLink></div><label v-else-if="!isForgot&&state.config.tos_url" class="checkbox"><input v-model="agreed" type="checkbox" required/>我已阅读并同意<a v-if="state.config.tos_url" :href="state.config.tos_url" target="_blank" rel="noopener noreferrer">服务条款 ↗</a><span v-else>服务条款(尚未提供)</span></label><button class="button primary full" :disabled="state.busy||!state.configReady">{{state.busy?'正在处理…':!state.configReady?'正在连接…':isLogin?'进入我的空间':isForgot?'更新密码':'创建账户'}}<Icon name="arrow"/></button></form><button v-if="isLogin" class="text-button mail-login" @click="mailLogin" :disabled="state.busy||!state.configReady">使用邮件链接登录 ↗</button><p class="auth-switch">{{isLogin?'还没有账户?':'已经有账户?'}}<RouterLink :to="isLogin?'/register':'/login'">{{isLogin?'加入 hardnerd':'登录'}} ↗</RouterLink></p></div><footer class="mono">HARDNERD.NET / KEEP EXPLORING.</footer></main></div></template>
|
||||
@@ -0,0 +1,5 @@
|
||||
<script setup>
|
||||
import {computed,ref,onMounted} from 'vue';import Icon from '../Icon.vue';import {state,api,notify,copy,loadAccount} from '../state.mjs';import {money,bytes,date,usage} from '../core.mjs';import DOMPurify from 'dompurify';
|
||||
const metric=computed(()=>usage(state.subscription)),notices=ref([]),failed=ref(false),greeting=computed(()=>new Date().getHours()<12?'上午好':new Date().getHours()<18?'下午好':'晚上好');
|
||||
onMounted(()=>api('/user/notice/fetch').then(data=>notices.value=data||[]).catch(()=>failed.value=true));
|
||||
</script><template><section class="page-heading"><div><span class="eyebrow">01 / YOUR CONNECTION AT A GLANCE</span><h1>{{greeting}},探索者<span class="lime-dot">.</span></h1><p>你的连接近况,都在这里。</p></div><button class="icon-button" @click="loadAccount().catch(error=>notify(error.message))" aria-label="刷新账户数据"><Icon name="refresh"/></button></section><div v-if="!state.ready" class="loading-state" role="status">正在读取你的空间…</div><div v-else-if="!state.user" class="empty panel"><h2>暂时没有读到账户数据</h2><button class="button primary" @click="loadAccount().catch(error=>notify(error.message))">重新加载</button></div><template v-else><div class="dashboard-grid"><section class="connection-card"><div class="connection-top"><span class="eyebrow">MY CONNECTION / 我的连接</span><span class="status-pill" :class="{active:state.subscription?.plan_id}">{{state.subscription?.plan_id?'已有套餐':'尚未订阅'}}</span></div><h2>{{state.subscription?.plan?.name||'为下一次探索,\n选一条新连接。'}}</h2><p>{{state.subscription?.plan_id?'每一次好奇,都值得一个顺畅的开始。':'选择适合的套餐,把世界再打开一点。'}}</p><div class="connection-bottom"><RouterLink :to="state.subscription?.plan_id?'/nodes':'/shop'" class="button light">{{state.subscription?.plan_id?'开始连接':'查看套餐'}}<Icon name="arrow"/></RouterLink><span class="mono">HN / YOUR NEXT CHAPTER</span></div><div class="connection-orbit" aria-hidden="true"><span>↗</span></div></section><section class="usage-card panel"><div class="panel-title"><h2>本期流量</h2><span class="mono">DATA / 01</span></div><div class="usage-body"><div class="usage-ring" :style="{'--usage':metric.percent+'%'}"><div><strong>{{metric.percent.toFixed(0)}}<small>%</small></strong><span>已使用</span></div></div><div class="usage-numbers"><span>剩余流量</span><strong>{{bytes(metric.remaining)}}</strong><span>{{bytes(metric.used)}} / {{bytes(metric.total)}}</span></div></div><div class="usage-footer"><span>套餐到期</span><b>{{state.subscription?.expired_at===null&&state.subscription?.plan_id?'不限时':date(state.subscription?.expired_at)}}</b></div></section></div><div class="stat-strip"><div><span>账户余额</span><strong>¥{{money(state.user.balance)}}</strong><small>用于账户内消费</small></div><div><span>当前套餐</span><strong class="small-value">{{state.subscription?.plan?.name||'暂未订阅'}}</strong><small>{{state.subscription?.plan_id?'查看连接与节点':'选择一个适合你的套餐'}}</small></div><div><span>下次流量重置</span><strong class="small-value">{{date(state.subscription?.next_reset_at)}}</strong><small>以当前套餐规则为准</small></div></div><div class="lower-grid"><section class="panel quick-panel"><div class="panel-title"><h2>快捷连接</h2><span class="mono">ONE LESS STEP.</span></div><button class="quick-row" @click="copy(state.subscription?.subscribe_url)"><span class="square-icon"><Icon name="copy"/></span><div><b>复制订阅地址</b><p>导入你正在使用的客户端</p></div><Icon name="arrow"/></button><RouterLink class="quick-row" to="/docs"><span class="square-icon"><Icon name="book"/></span><div><b>第一次使用?从这里开始</b><p>查看配置和客户端使用指南</p></div><Icon name="arrow"/></RouterLink></section><section class="panel notices"><div class="panel-title"><h2>来自 hardnerd</h2><span class="mono">UPDATES</span></div><p v-if="failed" class="muted">公告暂未加载,稍后重试。</p><div v-else-if="!notices.length" class="quiet-state"><span class="mono">ALL QUIET HERE.</span><p>暂无新公告。继续你的探索吧。</p></div><details v-for="notice in notices" :key="notice.id"><summary>{{notice.title}}<span>{{date(notice.updated_at)}}</span></summary><div class="prose" v-html="DOMPurify.sanitize(notice.content||'')"></div></details></section></div></template></template>
|
||||
@@ -0,0 +1,11 @@
|
||||
<script setup>
|
||||
import Icon from '../Icon.vue';import {state} from '../state.mjs';
|
||||
function jump(id){document.getElementById(id)?.scrollIntoView({behavior:window.matchMedia('(prefers-reduced-motion: reduce)').matches?'auto':'smooth'});}
|
||||
const logo=window.settings?.logo||'/brand/hn/logo.svg',brand=window.settings?.title||'hardnerd';
|
||||
</script>
|
||||
<template><div class="landing"><header class="landing-nav"><RouterLink to="/" class="brand"><img :src="logo" alt=""/>{{brand}}<sup>NET</sup></RouterLink><nav><a href="#idea" @click.prevent="jump('idea')">我们的主张</a><a href="#start" @click.prevent="jump('start')">开始连接</a></nav><RouterLink :to="state.token?'/dashboard':'/login'" class="nav-enter">{{state.token?'进入控制台':'登录账户'}} <Icon name="arrow"/></RouterLink></header>
|
||||
<main id="main" tabindex="-1"><section class="hero"><div class="hero-copy"><span class="eyebrow"><span class="tiny-dot"></span> FOR THE CURIOUS. / 为好奇而连接</span><h1>连接<span class="outlined">不止</span><br/>于此<span class="lime-dot">.</span></h1><p>你的世界,不必只有眼前这一面。<br/>把连接交给 hardnerd,把好奇留给自己。</p><div class="hero-actions"><RouterLink :to="state.token?'/dashboard':'/register'" class="button primary">{{state.token?'打开我的空间':'开启你的连接'}}<Icon name="arrow"/></RouterLink><RouterLink to="/login" class="text-button">已有账户?登录 ↗</RouterLink></div><div class="hero-foot mono"><span>01 — STAY CURIOUS</span><span>NETWORK / WITHOUT THE NOISE</span></div></div>
|
||||
<div class="hero-art" aria-hidden="true"><div class="art-caption mono">THE WORLD IS CLOSER<br/>THAN YOU THINK.</div><svg class="orbit-svg" viewBox="0 0 600 620"><defs><pattern id="dots" width="22" height="22" patternUnits="userSpaceOnUse"><circle cx="1" cy="1" r="1" fill="#8d9589"/></pattern></defs><rect x="0" y="0" width="600" height="620" fill="url(#dots)"/><g fill="none" stroke="#b9bdb0" stroke-width="1"><circle cx="300" cy="300" r="204"/><ellipse cx="300" cy="300" rx="204" ry="74"/><ellipse cx="300" cy="300" rx="100" ry="204"/><path d="M96 300h408M300 96v408M126 194h348M126 406h348"/></g><g fill="none" stroke="#171b1a" stroke-width="2"><path d="M112 335Q240 110 442 177M183 444Q412 437 442 177M112 335Q227 454 383 350"/></g><g fill="#b4f047" stroke="#171b1a" stroke-width="2"><circle cx="112" cy="335" r="9"/><circle cx="442" cy="177" r="9"/><circle cx="183" cy="444" r="9"/><circle cx="383" cy="350" r="9"/></g><g transform="translate(235 235) rotate(-8 65 65)"><rect width="130" height="130" rx="22" fill="#171b1a"/><path d="M28 26h18v78H28zm56 0h18v78H84" fill="#f4f3ee"/><path d="M20 51h34v25H28L20 68zm57 0h34v17l-8 8H77zM54 60h23" fill="#b4f047" stroke="#b4f047" stroke-width="5"/></g><text x="63" y="571" font-size="13" font-family="monospace">HN / 001</text><path d="M461 534h60m-10-10 10 10-10 10" fill="none" stroke="#171b1a" stroke-width="2"/></svg><span class="art-note mono">OPEN A NEW PERSPECTIVE ↗</span></div></section>
|
||||
<div class="brand-band"><span>STAY CURIOUS.</span><span class="band-star">✳</span><span>CONNECT DIFFERENT.</span><span class="band-star">✳</span><span>HARDNERD.</span></div>
|
||||
<section id="idea" class="manifesto"><div><span class="eyebrow">02 / LESS FRICTION. MORE WORLD.</span><h2>让连接简单。<br/>把空间留给探索。</h2></div><div class="principles"><article><span class="mono">01</span><div><h3>看得清楚,用得明白</h3><p>套餐、用量与到期时间,一眼就能找到。每一次选择,都有清楚的信息。</p></div></article><article><span class="mono">02</span><div><h3>从这里,开始连接</h3><p>订阅入口、节点列表与使用指南,集中在你的空间里。少一点寻找,多一点行动。</p></div></article><article><span class="mono">03</span><div><h3>遇到问题,有处可问</h3><p>把问题交给工单,让沟通有记录,让进展可追踪。</p></div></article></div></section>
|
||||
<section id="start" class="start-panel"><span class="eyebrow">YOUR NEXT CONNECTION STARTS HERE.</span><h2>下一站,<br/>由你定义<span>.</span></h2><RouterLink :to="state.token?'/shop':'/register'" class="button light">{{state.token?'选择适合的套餐':'加入 hardnerd'}}<Icon name="arrow"/></RouterLink><span class="start-mark" aria-hidden="true">↗</span></section></main><footer class="landing-footer"><span class="brand">{{brand}}.net</span><span>© {{new Date().getFullYear()}} {{brand}} · 保持好奇。</span><RouterLink to="/login">用户登录 ↗</RouterLink></footer></div></template>
|
||||
@@ -0,0 +1,9 @@
|
||||
<script setup>
|
||||
import {ref,onMounted,watch,computed,onBeforeUnmount} from 'vue';import {useRoute,useRouter} from 'vue-router';import QRCode from 'qrcode';import Icon from '../Icon.vue';import {api,state,action,notify,loadAccount,askConfirmation} from '../state.mjs';import {money,date,statusLabel,periods,safeLink} from '../core.mjs';
|
||||
const route=useRoute(),router=useRouter(),orders=ref([]),detail=ref(null),methods=ref([]),method=ref(''),loading=ref(true),error=ref(''),paymentLink=ref(''),qr=ref('');let generation=0;const paying=computed(()=>route.path==='/payment');
|
||||
async function load(){const n=++generation;loading.value=true;error.value='';paymentLink.value='';qr.value='';try{if(paying.value){const [order,payments]=await Promise.all([api('/user/order/detail?trade_no='+encodeURIComponent(route.query.trade_no||'')),api('/user/order/getPaymentMethod')]);if(n!==generation)return;detail.value=order;methods.value=payments||[];method.value=methods.value[0]?.id||'';}else{const value=await api('/user/order/fetch');if(n===generation)orders.value=value||[];}}catch(e){if(n===generation)error.value=e.message;}finally{if(n===generation)loading.value=false;}}
|
||||
onMounted(load);watch(()=>route.fullPath,load);onBeforeUnmount(()=>generation++);
|
||||
async function cancel(order){if(!await askConfirmation('确认取消这笔待支付订单?'))return;await action(async()=>{await api('/user/order/cancel',{method:'POST',data:{trade_no:order.trade_no}});await load();},'订单已取消');}
|
||||
async function checkout(){await action(async()=>{const result=await api('/user/order/checkout',{method:'POST',data:{trade_no:detail.value.trade_no,method:method.value},raw:true});if(result.type===1){const link=safeLink(result.data,window.location.origin);if(!link)throw new Error('支付链接格式不正确,请联系支持');paymentLink.value=link;}else if(result.type===0){qr.value=await QRCode.toDataURL(String(result.data));}else{await load();await loadAccount();notify('订单状态已更新');}});}
|
||||
async function refresh(){await action(async()=>{await api('/user/order/check?trade_no='+encodeURIComponent(detail.value.trade_no));await load();await loadAccount();},'已刷新订单状态');}
|
||||
</script><template><section class="page-heading"><div><span class="eyebrow">03 / EVERY STEP, IN ONE PLACE</span><h1>{{paying?'完成这次连接':'你的每一次选择'}}<span class="lime-dot">.</span></h1><p>{{paying?'订单已创建。选择支付方式,完成开通。':'订单记录与处理进度,清楚可查。'}}</p></div><RouterLink v-if="paying" to="/orders" class="text-button">← 返回订单</RouterLink><button v-else class="icon-button" @click="load" aria-label="刷新订单"><Icon name="refresh"/></button></section><div v-if="loading" class="loading-state" role="status">正在读取订单…</div><div v-else-if="error" class="empty panel"><h2>暂时无法读取订单</h2><p>{{error}}</p><button class="button primary" @click="load">重试</button></div><div v-else-if="paying&&detail" class="checkout-grid"><section class="panel checkout-plan"><span class="status-pill" :class="{active:detail.status===3}">{{statusLabel(detail.status)}}</span><h2>{{detail.plan?.name||'套餐订单'}}</h2><p class="mono order-number">{{detail.trade_no}}</p><div class="summary-line"><span>计费周期</span><b>{{periods[detail.period]||detail.period}}</b></div><div class="summary-line"><span>创建时间</span><b>{{date(detail.created_at)}}</b></div><div class="summary-line"><span>订单金额</span><b>¥{{money(detail.total_amount)}}</b></div><div class="summary-line" v-if="detail.handling_amount"><span>手续费</span><b>¥{{money(detail.handling_amount)}}</b></div><div class="summary-total"><span>应付金额</span><strong>¥{{money(Number(detail.total_amount)+Number(detail.handling_amount||0))}}</strong></div><button class="text-button" v-if="detail.status===0" @click="cancel(detail)" :disabled="state.busy">取消订单</button></section><aside class="panel checkout-summary"><span class="eyebrow">NEXT STEP</span><h2>{{detail.status===0?'选择支付方式':'订单进度'}}</h2><template v-if="detail.status===0"><div v-if="!methods.length" class="quiet-state"><p>暂未配置可用支付方式。</p><RouterLink to="/tickets" class="text-button">联系支持 ↗</RouterLink></div><label class="payment-option" v-for="item in methods" :key="item.id"><input type="radio" v-model="method" :value="item.id"/>{{item.name}}<span v-if="item.handling_fee_percent||item.handling_fee_fixed" class="hint">手续费 {{item.handling_fee_percent||0}}% + ¥{{money(item.handling_fee_fixed)}}</span></label><button class="button primary full" v-if="methods.length" :disabled="state.busy||!method" @click="checkout">{{state.busy?'正在处理…':'获取支付入口'}}<Icon name="arrow"/></button><a v-if="paymentLink" class="button dark full" :href="paymentLink" target="_blank" rel="noopener noreferrer">前往支付页面 ↗</a><img v-if="qr" class="payment-qr" :src="qr" alt="订单支付二维码"/><p v-if="paymentLink||qr" class="hint">支付完成后,点击下方按钮刷新订单状态。</p></template><p v-else class="muted">{{detail.status===3?'订单已完成,可以开始使用连接。':detail.status===2?'这笔订单已取消。':'订单正在处理中,请稍后刷新。'}}</p><button class="button outline full" @click="refresh" :disabled="state.busy"><Icon name="refresh"/>刷新订单状态</button><RouterLink v-if="detail.status===3" to="/dashboard" class="text-button">返回我的空间 ↗</RouterLink></aside></div><div v-else-if="!orders.length" class="empty panel"><Icon name="receipt"/><span class="eyebrow">A FRESH START.</span><h2>第一笔连接,还在前方。</h2><p>你还没有订单。找到适合的套餐,开始新的探索。</p><RouterLink to="/shop" class="button primary">浏览套餐<Icon name="arrow"/></RouterLink></div><section v-else class="panel order-table"><div class="table-row table-head"><span>订单 / 套餐</span><span>金额</span><span>日期</span><span>状态</span><span></span></div><div class="table-row" v-for="order in orders" :key="order.trade_no"><div><b>{{order.plan?.name||'套餐订单'}}</b><small class="mono">{{order.trade_no}}</small></div><strong>¥{{money(order.total_amount)}}</strong><span>{{date(order.created_at)}}</span><span class="status-pill" :class="{active:order.status===3}">{{statusLabel(order.status)}}</span><button class="text-button" @click="router.push({path:'/payment',query:{trade_no:order.trade_no}})">{{order.status===0?'继续支付':'查看详情'}} ↗</button></div></section></template>
|
||||
@@ -0,0 +1,10 @@
|
||||
<script setup>
|
||||
import {ref,computed,onMounted,watch} from 'vue';import {useRoute,useRouter} from 'vue-router';import Icon from '../Icon.vue';import {state,api,action,notify} from '../state.mjs';import {money,periods,planPeriods} from '../core.mjs';import DOMPurify from 'dompurify';
|
||||
const route=useRoute(),router=useRouter(),plans=ref([]),loading=ref(true),error=ref(''),selections=ref({}),coupon=ref(''),couponInfo=ref(null);const selected=computed(()=>plans.value.find(p=>String(p.id)===String(route.query.id))),confirming=computed(()=>route.path==='/order-confirm');const period=computed(()=>selected.value?selections.value[selected.value.id]:'');const total=computed(()=>{let cents=Number(selected.value?.[period.value]||0);if(couponInfo.value?.type===1)cents-=Number(couponInfo.value.value||0);if(couponInfo.value?.type===2)cents*=Math.max(0,1-Number(couponInfo.value.value||0)/100);return Math.max(0,cents);});
|
||||
async function load(){loading.value=true;error.value='';try{plans.value=await api('/user/plan/fetch')||[];for(const plan of plans.value){const options=planPeriods(plan);selections.value[plan.id]=options.includes(route.query.period)?route.query.period:options[0];}}catch(e){error.value=e.message;}finally{loading.value=false;}}
|
||||
onMounted(load);watch(()=>route.fullPath,()=>{coupon.value='';couponInfo.value=null;if(selected.value&&planPeriods(selected.value).includes(route.query.period))selections.value[selected.value.id]=route.query.period;});watch(coupon,()=>couponInfo.value=null);
|
||||
function choose(plan){router.push({path:'/order-confirm',query:{id:plan.id,period:selections.value[plan.id]}});}
|
||||
async function verify(){await action(async()=>{couponInfo.value=await api('/user/coupon/check',{method:'POST',data:{code:coupon.value,plan_id:selected.value.id,period:period.value}});},'优惠码已验证');}
|
||||
async function submit(){await action(async()=>{const trade=await api('/user/order/save',{method:'POST',data:{plan_id:selected.value.id,period:period.value,...(coupon.value?{coupon_code:coupon.value}:{})}});router.push({path:'/payment',query:{trade_no:trade}});});}
|
||||
function content(plan){const limit=plan.display_device_limit??plan.device_limit;return DOMPurify.sanitize(String(plan.content||'').replaceAll('{{display_device_limit}}',limit==null||Number(limit)===0?'不限':String(limit)));}
|
||||
</script><template><section class="page-heading"><div><span class="eyebrow">02 / FIND YOUR CONNECTION</span><h1>{{confirming?'确认你的选择':'给好奇,留点余量'}}<span class="lime-dot">.</span></h1><p>{{confirming?'核对套餐与周期,再创建订单。':'根据实际需求,找到适合的连接方式。'}}</p></div><RouterLink v-if="confirming" to="/shop" class="text-button">← 返回套餐列表</RouterLink><span v-else class="number-tag">HN / PLANS</span></section><div v-if="loading" class="loading-state" role="status">正在读取套餐…</div><div v-else-if="error" class="empty panel" role="alert"><h2>暂时无法读取套餐</h2><p>{{error}}</p><button class="button primary" @click="load">重试</button></div><template v-else-if="confirming"><div v-if="selected" class="checkout-grid"><section class="panel checkout-plan"><span class="eyebrow">YOUR SELECTION</span><h2>{{selected.name}}</h2><div class="prose" v-html="content(selected)"></div><h3>选择计费周期</h3><div class="period-grid"><button v-for="key in planPeriods(selected)" :key="key" :class="{selected:period===key}" @click="selections[selected.id]=key;couponInfo=null"><span>{{periods[key]}}</span><strong>¥{{money(selected[key])}}</strong></button></div><div class="plan-facts"><span>流量额度 <b>{{selected.transfer_enable}} GB</b></span><span>速率上限 <b>{{selected.speed_limit==null?'不限速':selected.speed_limit+' Mbps'}}</b></span></div></section><aside class="panel checkout-summary"><span class="eyebrow">ORDER SUMMARY</span><h2>订单摘要</h2><label>优惠码<div class="input-action"><input v-model="coupon" placeholder="如果你有优惠码"/><button @click="verify" :disabled="!coupon||state.busy">验证</button></div></label><div class="summary-line"><span>{{selected.name}}</span><b>{{periods[period]}}</b></div><div class="summary-line"><span>套餐金额</span><b>¥{{money(selected[period])}}</b></div><div v-if="couponInfo" class="summary-line"><span>优惠</span><b>−¥{{money(selected[period]-total)}}</b></div><div class="summary-total"><span>预计金额</span><strong>¥{{money(total)}}</strong></div><p class="hint">最终应付金额及手续费以创建后的订单为准。</p><button class="button primary full" @click="submit" :disabled="state.busy||!period">{{state.busy?'正在创建…':'创建订单'}}<Icon name="arrow"/></button></aside></div><div v-else class="empty panel"><h2>没有找到这个套餐</h2><RouterLink to="/shop" class="button primary">返回套餐列表</RouterLink></div></template><template v-else><div v-if="!plans.length" class="empty panel"><Icon name="bag"/><h2>套餐正在准备中</h2><p>目前暂无可购买套餐,请稍后回来看看。</p></div><div v-else class="plan-grid"><article class="plan-card" v-for="(plan,index) in plans" :key="plan.id"><div class="plan-top"><span class="mono">PLAN / {{String(index+1).padStart(2,'0')}}</span><Icon name="spark"/></div><h2>{{plan.name}}</h2><div class="plan-price"><span>¥</span><strong>{{money(plan[selections[plan.id]])}}</strong><small>/ {{periods[selections[plan.id]]}}</small></div><label class="period-select">计费周期<select v-model="selections[plan.id]"><option v-for="key in planPeriods(plan)" :key="key" :value="key">{{periods[key]}} · ¥{{money(plan[key])}}</option></select></label><div class="plan-facts"><span><Icon name="check"/>{{plan.transfer_enable}} GB 流量</span><span><Icon name="check"/>{{plan.speed_limit==null?'不限速':plan.speed_limit+' Mbps 速率上限'}}</span><span><Icon name="check"/>{{(plan.display_device_limit??plan.device_limit)?(plan.display_device_limit??plan.device_limit)+' 台设备':'设备数量不限'}}</span></div><div class="prose plan-description" v-html="content(plan)"></div><button class="button primary full" :disabled="!selections[plan.id]" @click="choose(plan)">选择这个套餐<Icon name="arrow"/></button></article></div><div class="help-strip"><span><Icon name="help"/>不确定怎么选?告诉我们你的使用需求。</span><RouterLink to="/tickets">联系支持 ↗</RouterLink></div></template></template>
|
||||
@@ -0,0 +1,23 @@
|
||||
<script setup>
|
||||
import {ref,computed,onMounted,watch,onBeforeUnmount} from 'vue';import {useRoute,useRouter} from 'vue-router';import DOMPurify from 'dompurify';import {marked} from 'marked';import Icon from '../Icon.vue';import {state,api,action,copy,askConfirmation} from '../state.mjs';import {date,money,safeLink} from '../core.mjs';
|
||||
const route=useRoute(),router=useRouter(),data=ref(null),loading=ref(true),error=ref(''),search=ref(''),creating=ref(false),subject=ref(''),message=ref(''),level=ref(0),reply=ref('');let generation=0;
|
||||
const kind=computed(()=>route.path.slice(1)),heads={nodes:['05 / GET CONNECTED','把世界,接到眼前。','订阅地址、可用节点与连接入口。'],tickets:['06 / WE ARE HERE TO HELP','问题,交给我们。','新的工单、沟通记录和回复进展。'],docs:['07 / A LITTLE GUIDANCE','好连接,从懂得开始。','使用指南与常见问题。'],invite:['08 / GOOD THINGS TRAVEL','好连接,值得分享。','邀请好友,以及你的邀请记录。']};
|
||||
const heading=computed(()=>heads[kind.value]);const filtered=computed(()=>{const values=Array.isArray(data.value)?data.value:[];return values.filter(item=>(item.name||item.subject||'').toLowerCase().includes(search.value.toLowerCase()));});
|
||||
const documents=computed(()=>data.value&&kind.value==='docs'&&!route.query.id?Object.entries(data.value).flatMap(([category,items])=>(Array.isArray(items)?items:[]).map(item=>({...item,category}))):[]);const foundDocs=computed(()=>documents.value.filter(item=>(item.title||'').includes(search.value)));
|
||||
function article(body){return DOMPurify.sanitize(marked.parse(String(body||'')));}
|
||||
async function load(){const n=++generation;loading.value=true;error.value='';data.value=null;search.value='';try{let path=kind.value==='nodes'?'/user/server/fetch':kind.value==='tickets'?'/user/ticket/fetch':kind.value==='docs'?'/user/knowledge/fetch?language=zh-CN':'/user/invite/fetch';if(route.query.id)path+=(path.includes('?')?'&':'?')+'id='+encodeURIComponent(route.query.id);const value=await api(path);if(n===generation)data.value=value;}catch(e){if(n===generation)error.value=e.message;}finally{if(n===generation)loading.value=false;}}
|
||||
onMounted(load);watch(()=>route.fullPath,()=>{creating.value=false;reply.value='';load();});onBeforeUnmount(()=>generation++);
|
||||
async function createTicket(){await action(async()=>{await api('/user/ticket/save',{method:'POST',data:{subject:subject.value,message:message.value,level:level.value}});creating.value=false;subject.value='';message.value='';await load();},'工单已提交');}
|
||||
async function sendReply(){await action(async()=>{await api('/user/ticket/reply',{method:'POST',data:{id:data.value.id,message:reply.value}});reply.value='';await load();},'回复已发送');}
|
||||
async function closeTicket(){if(!await askConfirmation('确认关闭这张工单?'))return;await action(async()=>{await api('/user/ticket/close',{method:'POST',data:{id:data.value.id}});await load();},'工单已关闭');}
|
||||
async function inviteCode(){await action(async()=>{await api('/user/invite/save');await load();},'邀请码已创建');}
|
||||
function invitation(code){return window.location.origin+window.location.pathname+'#/register?code='+encodeURIComponent(code);}
|
||||
const subscribeLink=computed(()=>safeLink(state.subscription?.subscribe_url,window.location.origin));
|
||||
</script><template><section class="page-heading"><div><span class="eyebrow">{{heading[0]}}</span><h1>{{heading[1]}}</h1><p>{{heading[2]}}</p></div><button v-if="kind==='tickets'&&!route.query.id" class="button primary" @click="creating=!creating"><Icon name="plus"/>新建工单</button><RouterLink v-else-if="route.query.id" :to="'/'+kind" class="text-button">← 返回列表</RouterLink><span v-else class="number-tag">HN / {{kind.toUpperCase()}}</span></section>
|
||||
<section v-if="kind==='nodes'" class="panel subscribe-panel"><div><span class="eyebrow">YOUR SUBSCRIPTION</span><h2>一个地址,把连接带走。</h2><p class="muted">复制订阅地址,在客户端中导入。订阅地址仅供你本人使用。</p></div><div class="subscription-actions"><button class="button primary" :disabled="!state.subscription?.subscribe_url" @click="copy(state.subscription?.subscribe_url)"><Icon name="copy"/>复制订阅地址</button><RouterLink to="/docs" class="button outline">查看使用指南<Icon name="arrow"/></RouterLink></div></section>
|
||||
<form v-if="kind==='tickets'&&creating" class="panel ticket-form" @submit.prevent="createTicket"><div class="panel-title"><h2>把问题说清楚,我们更好帮到你。</h2><button type="button" class="icon-button" @click="creating=false" aria-label="关闭新工单"><Icon name="close"/></button></div><div class="field-pair"><label>问题主题<input v-model="subject" required maxlength="100" placeholder="例如:客户端无法导入订阅"/></label><label>优先级<select v-model="level"><option :value="0">一般</option><option :value="1">中等</option><option :value="2">紧急</option></select></label></div><label>问题描述<textarea v-model="message" required rows="5" placeholder="描述遇到的问题、使用的客户端及已经尝试的步骤。"></textarea></label><button class="button primary" :disabled="state.busy">提交工单<Icon name="arrow"/></button></form>
|
||||
<div v-if="loading" class="loading-state" role="status">正在读取{{kind==='tickets'?'工单':kind==='nodes'?'节点':kind==='docs'?'指南':'邀请记录'}}…</div><div v-else-if="error" class="empty panel"><h2>暂时无法读取内容</h2><p>{{error}}</p><button class="button primary" @click="load">重试</button></div>
|
||||
<template v-else-if="kind==='nodes'"><div class="list-toolbar"><h2>可用节点 <span class="count">{{Array.isArray(data)?data.length:0}}</span></h2><input v-model="search" aria-label="搜索节点" placeholder="搜索节点名称…"/></div><div v-if="!filtered.length" class="empty panel"><Icon name="globe"/><h2>{{state.subscription?.plan_id?'暂无可用节点':'你的第一条连接,还没开始。'}}</h2><p>{{state.subscription?.plan_id?'请稍后重试,或通过工单联系支持。':'购买套餐后,可在这里查看对应节点。'}}</p><RouterLink v-if="!state.subscription?.plan_id" to="/shop" class="button primary">查看套餐<Icon name="arrow"/></RouterLink></div><div v-else class="node-grid"><article class="panel node-card" v-for="node in filtered" :key="node.cache_key"><Icon name="globe"/><h3>{{node.name}}</h3><span class="status-pill" :class="{active:node.is_online}">{{node.is_online?'在线':'离线'}}</span><div class="node-meta"><span>{{node.type}}</span><span>{{node.rate}}× 倍率</span></div></article></div></template>
|
||||
<template v-else-if="kind==='tickets'"><section v-if="route.query.id&&data" class="panel conversation"><div class="panel-title"><h2>{{data.subject}}</h2><span class="status-pill">{{data.status?'已关闭':'处理中'}}</span></div><article v-for="item in data.message||[]" :key="item.id" class="message" :class="{'from-me':item.is_me}"><span class="mono">{{item.is_me?'我':'hardnerd 支持'}} · {{date(item.created_at)}}</span><p>{{item.message}}</p></article><form v-if="!data.status" @submit.prevent="sendReply"><label>补充回复<textarea v-model="reply" required rows="4" placeholder="补充新的信息…"></textarea></label><div class="form-actions"><button class="button primary" :disabled="state.busy">发送回复<Icon name="arrow"/></button><button type="button" class="text-button" @click="closeTicket" :disabled="state.busy">关闭工单</button></div></form></section><div v-else-if="!filtered.length" class="empty panel"><Icon name="help"/><h2>这里很安静。</h2><p>你还没有工单。有问题时,我们就在这里。</p><button class="button primary" @click="creating=true">创建第一张工单<Icon name="arrow"/></button></div><section v-else class="panel ticket-list"><button class="ticket-row" v-for="ticket in filtered" :key="ticket.id" @click="router.push({path:'/tickets',query:{id:ticket.id}})"><span class="mono">#{{ticket.id}}</span><div><b>{{ticket.subject}}</b><small>{{date(ticket.updated_at)}}</small></div><span class="status-pill" :class="{active:ticket.reply_status===0&&!ticket.status}">{{ticket.status?'已关闭':ticket.reply_status===0?'待回复':'有新回复'}}</span><Icon name="arrow"/></button></section></template>
|
||||
<template v-else-if="kind==='docs'"><article v-if="route.query.id&&data" class="panel article"><span class="eyebrow">{{data.category}}</span><h2>{{data.title}}</h2><div class="prose" v-html="article(data.body)"></div></article><template v-else><div class="list-toolbar"><h2>探索指南</h2><input v-model="search" aria-label="搜索指南" placeholder="搜索标题…"/></div><div v-if="!foundDocs.length" class="empty panel"><Icon name="book"/><h2>指南正在准备中。</h2><p>如果你需要帮助,可以先创建工单。</p><RouterLink to="/tickets" class="button outline">联系支持<Icon name="arrow"/></RouterLink></div><div v-else class="docs-grid"><RouterLink class="panel doc-card" v-for="doc in foundDocs" :key="doc.id" :to="{path:'/docs',query:{id:doc.id}}"><span class="eyebrow">{{doc.category}}</span><h2>{{doc.title}}</h2><span class="text-button">阅读指南<Icon name="arrow"/></span></RouterLink></div></template></template>
|
||||
<template v-else-if="kind==='invite'"><section class="invite-hero"><div><span class="eyebrow">SHARE A GOOD CONNECTION.</span><h2>把好奇,<br/>带给朋友。</h2><p>创建你的专属邀请链接,分享给需要的人。</p><button class="button light" @click="inviteCode" :disabled="state.busy"><Icon name="plus"/>创建邀请码</button></div><span class="invite-art" aria-hidden="true">↗<br/>↗</span></section><div class="stat-strip"><div><span>已邀请用户</span><strong>{{data?.stat?.[0]||0}}</strong><small>注册人数</small></div><div><span>累计佣金</span><strong>¥{{money(data?.stat?.[1])}}</strong><small>以实际邀请记录为准</small></div><div><span>可用佣金</span><strong>¥{{money(data?.stat?.[4])}}</strong><small>奖励比例 {{data?.stat?.[3]||0}}%</small></div></div><section class="panel"><div class="panel-title"><h2>你的邀请链接</h2><span class="mono">PASS IT ON.</span></div><p v-if="!data?.codes?.length" class="muted">还没有邀请码,点击上方按钮创建。</p><div v-for="item in data?.codes||[]" :key="item.code" class="invite-row"><span class="mono">{{item.code}}</span><button class="button outline" @click="copy(invitation(item.code))"><Icon name="copy"/>复制邀请链接</button></div></section></template></template>
|
||||
@@ -0,0 +1,24 @@
|
||||
import {reactive} from 'vue';
|
||||
const key='hardnerd.auth';
|
||||
function stored(){try{return sessionStorage.getItem(key)||localStorage.getItem(key)||'';}catch{return '';}}
|
||||
export const state=reactive({token:stored(),user:null,subscription:null,config:{},configReady:false,configError:false,confirm:null,toast:'',busy:false,ready:false});
|
||||
let toastTimer;
|
||||
export function notify(message){state.toast=message;clearTimeout(toastTimer);toastTimer=setTimeout(()=>state.toast='',5000);}
|
||||
export function signIn(token,remember=false){if(typeof token!=='string'||!token.startsWith('Bearer '))throw new Error('登录凭据格式不正确');localStorage.removeItem(key);sessionStorage.removeItem(key);(remember?localStorage:sessionStorage).setItem(key,token);state.token=token;state.user=null;state.subscription=null;state.ready=false;}
|
||||
export function signOut(){localStorage.removeItem(key);sessionStorage.removeItem(key);state.token='';state.user=null;state.subscription=null;state.ready=false;}
|
||||
export async function api(path,{method='GET',data,raw=false}={}){
|
||||
if(!path.startsWith('/')||path.startsWith('//'))throw new Error('接口地址无效');
|
||||
const sentToken=state.token;const controller=new AbortController();const timer=setTimeout(()=>controller.abort(),20000);
|
||||
try{
|
||||
const response=await fetch('/api/v1'+path,{method,credentials:'same-origin',redirect:'error',signal:controller.signal,headers:{Accept:'application/json',...(sentToken?{Authorization:sentToken}:{}),...(data?{'Content-Type':'application/json'}:{})},...(data?{body:JSON.stringify(data)}:{})});
|
||||
let body;try{body=await response.json();}catch{throw new Error('服务暂时不可用,请稍后重试');}
|
||||
if(state.token===sentToken&&(response.status===401||(response.status===403&&body.message==='Unauthorized'))){signOut();window.dispatchEvent(new Event('hardnerd-expired'));}
|
||||
if(!response.ok){const detail=body.errors?Object.values(body.errors).flat()[0]:null;throw new Error(detail||body.message||'操作失败,请稍后重试');}
|
||||
return raw?body:body.data;
|
||||
}catch(error){if(error.name==='AbortError')throw new Error('请求超时,请检查网络后重试');throw error;}finally{clearTimeout(timer);}
|
||||
}
|
||||
export async function loadAccount(){const token=state.token;state.ready=false;try{const [user,subscription]=await Promise.all([api('/user/info'),api('/user/getSubscribe')]);if(state.token===token){state.user=user;state.subscription=subscription;}}finally{if(state.token===token)state.ready=true;}}
|
||||
export async function action(callback,success){if(state.busy)return;state.busy=true;try{await callback();if(success)notify(success);}catch(error){notify(error.message);}finally{state.busy=false;}}
|
||||
export async function copy(text){if(!text){notify('暂无可复制的内容');return;}try{await navigator.clipboard.writeText(text);notify('已复制');}catch{notify('浏览器未允许复制,请手动选择内容');}}
|
||||
|
||||
export function askConfirmation(message){if(state.confirm)state.confirm.resolve(false);return new Promise(resolve=>state.confirm={message,resolve});}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
:root{font-family:Arial,'PingFang SC','Microsoft YaHei',sans-serif;color:#171b1a;background:#f4f3ee;font-synthesis:none;--paper:#f4f3ee;--ink:#171b1a;--lime:#b4f047;--line:#dadcd3;--muted:#6f756d;--white:#fff;--mono:'SFMono-Regular',Consolas,monospace}*{box-sizing:border-box}body{margin:0}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}button,select,input,textarea{color:inherit}button{background:none;border:0}button svg,a svg{flex-shrink:0}svg{width:22px;height:22px}h1,h2,h3,p{margin:0}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #79a322;outline-offset:4px}main:focus{outline:0}.skip-link{position:fixed;top:-80px;left:16px;background:var(--lime);padding:12px;z-index:100}.skip-link:focus{top:12px}.brand{display:flex;align-items:center;gap:10px;font-size:25px;font-weight:900;letter-spacing:-1.2px}.brand img{width:36px;height:36px}.brand sup,.word-dot{font-size:10px;align-self:flex-start;margin-top:4px}.mono,.eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:1.2px}.eyebrow{display:flex;align-items:center;gap:9px;line-height:1.6;color:var(--muted);font-weight:600}.tiny-dot{width:7px;height:7px;display:inline-block;background:var(--lime);border-radius:50%;flex-shrink:0}.muted,.hint{color:var(--muted);font-size:14px;line-height:1.7}.hint{font-size:12px}.button{display:inline-flex;justify-content:center;align-items:center;gap:16px;min-height:48px;padding:13px 22px;font-weight:700;font-size:14px;border-radius:3px;transition:background .15s,transform .15s}.button:hover:not(:disabled){transform:translateY(-2px)}.button.primary{background:var(--lime);color:var(--ink);border:1px solid transparent}.button.primary:hover{background:#c4fa6a}.button.dark{background:var(--ink);color:var(--white)}.button.light{background:var(--paper);color:var(--ink)}.button.outline{border:1px solid var(--line)}.button.full{width:100%;margin-top:16px}.text-button{display:inline-flex;align-items:center;gap:10px;font-size:13px;font-weight:600;padding:9px 0}.icon-button{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:1px solid var(--line);border-radius:3px}.outlined{-webkit-text-stroke:1.6px var(--ink);color:transparent}.lime-dot{color:#87b832}.landing{max-width:1600px;margin:auto}.landing-nav{display:flex;justify-content:space-between;align-items:center;height:106px;padding:0 6%;border-bottom:1px solid var(--line)}.landing-nav nav{display:flex;gap:34px;font-size:13px}.nav-enter{display:flex;align-items:center;gap:20px;font-size:13px;border-bottom:1px solid var(--ink);padding-bottom:8px}.hero{display:grid;grid-template-columns:1fr 1fr;min-height:650px;border-bottom:1px solid var(--line)}.hero-copy{padding:60px 0 0 12%;display:flex;flex-direction:column}.hero h1{font-size:clamp(60px,7.7vw,116px);font-weight:900;line-height:1.12;letter-spacing:-6px;margin:29px 0}.hero-copy>p{font-size:17px;color:#666d62;line-height:1.9}.hero-actions{display:flex;align-items:center;gap:24px;margin:32px 0 46px}.hero-foot{border-top:1px solid var(--line);padding:18px 18px 18px 0;display:flex;justify-content:space-between;margin-top:auto;color:#858b80;font-size:9px}.hero-art{position:relative;margin:32px 32px 28px 35px;background:#e9ecdf;border:1px solid #d9ddcf;overflow:hidden}.orbit-svg{width:100%;height:100%;min-height:560px}.art-caption{position:absolute;top:28px;left:30px;font-size:12px;line-height:1.8;z-index:1}.art-note{position:absolute;right:24px;bottom:28px;font-size:9px}.brand-band{display:flex;align-items:center;justify-content:space-around;padding:24px;background:var(--lime);font-size:22px;font-weight:900;letter-spacing:-.5px}.band-star{font-size:36px;font-weight:400}.manifesto{padding:100px 6%;display:grid;grid-template-columns:1fr 1fr;gap:70px}.manifesto h2{font-size:38px;line-height:1.4;margin-top:25px;letter-spacing:-1px}.principles article{display:flex;gap:30px;border-top:1px solid var(--line);padding:25px 0}.principles h3{font-size:18px;margin-bottom:12px}.principles p{font-size:14px;line-height:1.9;color:var(--muted)}.principles article>.mono{color:#8c9388;padding-top:4px}.start-panel{position:relative;background:var(--ink);color:var(--paper);margin:0 6% 50px;padding:58px;overflow:hidden}.start-panel .eyebrow{color:#aab29f}.start-panel h2{font-size:60px;font-weight:800;line-height:1.3;margin:24px 0 30px;letter-spacing:-2px}.start-panel h2 span{color:var(--lime)}.start-mark{position:absolute;right:40px;top:15px;font-size:310px;line-height:1.1;color:var(--lime)}.landing-footer{display:flex;justify-content:space-between;align-items:center;padding:35px 6%;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.landing-footer .brand{color:var(--ink)}
|
||||
/* Independent hardnerd workspace */
|
||||
.workspace{min-height:100vh;display:flex}.sidebar{background:var(--ink);color:#d5d9cf;position:fixed;inset:0 auto 0 0;width:224px;display:flex;flex-direction:column;padding:36px 20px 20px;z-index:20}.side-brand{font-size:25px;color:var(--paper);gap:8px;margin:0 4px 54px}.side-brand img{width:32px;height:32px}.nav-label{font:9px var(--mono);letter-spacing:1.4px;color:#7b8578;margin:0 14px 18px}.sidebar nav{display:grid;gap:7px}.sidebar nav a{display:flex;align-items:center;gap:12px;padding:14px;border-radius:3px;font-size:13px}.sidebar nav a svg{width:19px;height:19px;color:#84907f}.sidebar nav a:hover{background:#242b22}.sidebar nav a.router-link-active{color:var(--lime);background:#2a3421}.sidebar nav a.router-link-active svg{color:var(--lime)}.nav-pointer{margin-left:auto;opacity:0}.router-link-active .nav-pointer{opacity:1}.side-bottom{margin-top:auto;padding-top:35px}.invite-link{display:flex;gap:9px;align-items:center;font-size:11px;background:#252d20;padding:14px 11px;color:#c7dca9;margin-bottom:22px}.invite-link svg{width:17px;height:17px}.invite-link span{margin-left:auto}.identity{display:flex;align-items:center;gap:9px;border-top:1px solid #333b2f;padding-top:22px}.avatar{display:flex;align-items:center;justify-content:center;background:#3d482e;color:var(--lime);font:bold 17px var(--mono);width:34px;height:34px;flex-shrink:0;border-radius:50%}.identity b{display:block;font-size:11px}.identity small{display:block;font-size:9px;color:#8f9988;margin-top:4px;max-width:118px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.identity svg{width:16px;height:16px;margin-left:auto;color:#7c8874}.logout{color:#97a18d;display:flex;gap:8px;align-items:center;font-size:11px;margin:20px 0 25px}.logout svg{width:14px;height:14px}.side-footer{font:8px var(--mono);letter-spacing:.5px;color:#66725d}.work-main{width:calc(100% - 224px);margin-left:224px;min-height:100vh;display:flex;flex-direction:column}.work-top{height:76px;border-bottom:1px solid var(--line);padding:0 4.5%;display:flex;align-items:center;justify-content:space-between}.work-top>.mono{font-size:9px;color:var(--muted)}.slash{color:#a4ab9b;padding:0 10px}.top-help{display:flex;align-items:center;gap:8px;font-size:11px}.top-help svg{width:14px;height:14px}.work-main main{padding:40px 4.5% 55px;max-width:1500px;width:100%;margin:0 auto;flex:1}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:32px}.page-heading h1{font-size:36px;letter-spacing:-1.5px;line-height:1.3;margin:12px 0}.page-heading p{font-size:13px;color:var(--muted);line-height:1.8}.number-tag{font:9px var(--mono);color:var(--muted);padding:13px;border:1px solid var(--line);white-space:nowrap}.panel{background:#fcfcf8;border:1px solid var(--line);border-radius:4px;padding:26px}.panel-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.panel-title h2{font-size:16px;font-weight:700}.panel-title .mono{font-size:8px;color:#929988}.dashboard-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:22px}.connection-card{background:var(--ink);color:var(--paper);position:relative;overflow:hidden;padding:28px;border-radius:4px;min-height:265px}.connection-top{display:flex;gap:14px;align-items:center;justify-content:space-between;position:relative;z-index:1}.connection-top .eyebrow{color:#a5b195;font-size:9px}.connection-card h2{font-size:29px;letter-spacing:-.8px;line-height:1.45;white-space:pre-line;position:relative;z-index:1;margin:26px 0 10px;max-width:330px}.connection-card>p{font-size:11px;color:#a4ad9b;position:relative;z-index:1}.connection-bottom{margin-top:30px;display:flex;align-items:center;justify-content:space-between;gap:15px;position:relative;z-index:1}.connection-bottom .button{font-size:12px;min-height:40px;padding:11px 17px}.connection-bottom>.mono{font-size:7px;color:#8f9d81}.connection-orbit{position:absolute;border:1px solid #35402d;width:220px;height:220px;right:-76px;top:72px;border-radius:50%;display:flex;align-items:center;justify-content:center;transform:rotate(-12deg)}.connection-orbit:after{content:'';width:145px;height:145px;position:absolute;border:1px solid #37462a;border-radius:50%}.connection-orbit span{font-size:125px;line-height:1;color:#b4f04740}.status-pill{padding:5px 10px;font-size:10px;border:1px solid #d5d8ce;background:#f0f1e9;border-radius:20px;white-space:nowrap;display:inline-block;color:#727b68}.status-pill.active{background:#e7f1d7;border-color:#d5e6ba;color:#496722}.connection-card .status-pill{border-color:#424e34;background:#2d3922;color:#b4cd91}.usage-card{display:flex;flex-direction:column}.usage-body{display:flex;align-items:center;gap:22px;flex:1;padding:12px 0 20px}.usage-ring{border-radius:50%;background:conic-gradient(var(--lime) var(--usage),#e6e9df 0);width:118px;height:118px;padding:9px;flex-shrink:0}.usage-ring>div{background:#fcfcf8;border-radius:50%;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-iteLine truncated
|
||||
/* Auth */
|
||||
.auth-layout{display:grid;grid-template-columns:45% 55%;min-height:100vh}.auth-art{background:var(--ink);color:var(--paper);padding:45px 11%;display:flex;flex-direction:column;overflow:hidden;position:relative}.auth-art .brand{color:var(--paper);margin-bottom:85px}.auth-art .eyebrow{color:#9ba58f;font-size:9px}.auth-slogan{font-size:clamp(30px,3.7vw,58px);line-height:1.55;font-weight:800;letter-spacing:-1px;margin-top:24px;position:relative;z-index:1}.auth-slogan span{color:var(--lime)}.auth-art>.mono{margin-top:auto;padding-top:180px;color:#81926e;font-size:8px}.auth-diagram{position:absolute;bottom:95px;right:10px;width:270px;height:270px}.diagram-ring{position:absolute;inset:0;border:1px solid #404f32;border-radius:50%;transform:rotate(-30deg)}.diagram-ring:after{content:'';position:absolute;inset:50px;border:1px solid #3a482d;border-radius:50%}.auth-diagram>span{position:absolute;top:110px;left:95px;color:var(--lime);font:bold 34px var(--mono)}.auth-diagram i{position:absolute;top:30px;left:32px;width:18px;height:18px;background:var(--lime);border-radius:50%}.auth-diagram>b{position:absolute;right:17px;bottom:36px;font-size:85px;font-weight:400;color:#596b45}.auth-main{padding:40px 12%;display:flex;flex-direction:column;justify-content:space-between}.auth-back{font-size:12px;color:var(--muted)}.auth-form{width:100%;max-width:400px;margin:55px auto}.auth-form h1{font-size:31px;letter-spacing:-1px;line-height:1.4;margin:20px 0 12px}.auth-form>.muted{font-size:13px;margin-bottom:30px}.auth-form form{margin-top:25px}.auth-options{display:flex;justify-content:space-between;align-items:center;font-size:11px;margin:20px 0}.auth-options .checkbox{font-size:11px;margin:0}.auth-switch{margin-top:28px;padding-top:25px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.auth-switch a{font-weight:600;color:var(--ink);margin-left:10px}.auth-main footer{font-size:8px;color:#9ea692}.captcha{margin:20px 0}.captcha p{color:#a14b27;font-size:12px;line-height:1.7}
|
||||
/* Plans, orders, and accounts */
|
||||
.plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:22px}.plan-card{background:#fcfcf8;border:1px solid var(--line);border-radius:4px;padding:27px;max-width:420px}.plan-card:hover{border-color:#89b744}.plan-top{display:flex;justify-content:space-between;align-items:center;color:#89967a;margin-bottom:32px}.plan-top .mono{font-size:9px}.plan-card h2{font-size:23px;line-height:1.4;margin-bottom:24px}.plan-price{display:flex;align-items:baseline;gap:5px}.plan-price>span{font-size:20px}.plan-price strong{font-size:48px;font-weight:800;letter-spacing:-2px}.plan-price small{font-size:10px;color:var(--muted);margin-left:5px}.period-select{font-size:10px;color:#818d75;margin:24px 0}.period-select select{font-size:12px;color:var(--ink);background:var(--paper)}.plan-facts{display:flex;flex-direction:column;gap:14px;border-top:1px solid var(--line);padding:23px 0;font-size:12px}.plan-facts>span{display:flex;align-items:center;gap:10px;justify-content:space-between}.plan-facts>span:has(svg){justify-content:flex-start}.plan-facts svg{width:16px;height:16px;color:#78a436}.plan-description{min-height:65px;margin-bottom:15px}.help-strip{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:32px;padding:22px 0;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.help-strip>span{display:flex;align-items:center;gap:10px}.help-strip svg{width:16px;height:16px}.help-strip a{color:var(--ink);white-space:nowrap}.checkout-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:25px}.checkout-plan h2,.checkout-summary h2{font-size:23px;margin:18px 0 25px;line-height:1.4}.checkout-plan h3{font-size:13px;margin:30px 0 18px}.period-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:25px}.period-grid button{border:1px solid var(--line);padding:18px;display:flex;flex-direction:column;gap:14px;align-items:flex-start;border-radius:3px;background:var(--paper)}.period-grid button.selected{border-color:#7faa34;background:#eef5e0}.period-grid span{font-size:12px}.period-grid strong{font-size:20px}.summary-line{display:flex;justify-content:space-between;gap:25px;margin:22px 0;font-size:12px;line-height:1.7}.summary-line>span{color:var(--muted)}.summary-total{border-top:1px solid var(--line);padding-top:24px;margin-top:30px;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px;font-size:13px}.summary-total strong{font-size:30px;letter-spacing:-1px}.order-number{font-size:10px;color:var(--muted);overflow-wrap:anywhere}.order-table{padding:0;overflow:auto}.table-row{display:grid;grid-template-columns:2.3fr 1fr 1fr 1fr 1.15fr;align-items:center;gap:14px;padding:22px;border-bottom:1px solid var(--line);font-size:12px;min-width:650px}.table-row:last-child{border:0}.table-head{background:#eef0e6;color:#858d7c;font-size:10px;padding:15px 22px}.table-row small{display:block;font-size:9px;color:var(--muted);margin-top:9px;overflow-wrap:anywhere}.table-row .status-pill{width:fit-content}.table-row .text-button{font-size:11px}.payment-option{display:flex;align-items:center;gap:12px;background:var(--paper);border:1px solid var(--line);padding:16px;margin:12px 0}.payment-option .hint{font-size:9px;margin-left:auto}.payment-qr{width:200px;max-width:100%;display:block;margin:20px auto}.account-grid{display:grid;grid-template-columns:.8fr 1.7fr;gap:24px;align-items:start}.account-profile{text-align:center}.avatar.large{width:75px;height:75px;font-size:30px;margin:12px auto 22px;background:#e5edda;color:#668632}.account-profile h2{font-size:25px;margin-bottom:10px;overflow-wrap:anywhere}.email{font-size:11px;overflow-wrap:anywhere}.account-tag{display:inline-block;border:1px solid #dde5d3;padding:8px 10px;font:8px var(--mono);color:#748862;margin:22px 0}.profile-detail{display:flex;justify-content:space-between;gap:15px;padding:18px 0;border-top:1px solid var(--line);font-size:11px}.profile-detail span{color:var(--muted)}.account-settings{display:grid;gap:23px}.account-settings .panel{padding:28px}.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:25px;margin:0 0 24px}.toggle-row small{display:block;color:var(--muted);font-weight:400;font-size:10px;margin-top:8px}.toggle-row input{width:32px;height:18px}.session-row{display:flex;justify-content:space-between;align-items:center;padding:17px 0;border-top:1px solid var(--line);font-size:12px}.session-row small{display:block;color:var(--muted);font-size:10px;margin-top:9px}.session-row .text-button{font-size:10px}
|
||||
/* Connection, knowledge and support */
|
||||
.subscribe-panel{display:flex;justify-content:space-between;align-items:center;gap:30px;margin-bottom:35px}.subscribe-panel h2{font-size:23px;margin:17px 0 12px}.subscribe-panel p{font-size:11px;max-width:380px}.subscription-actions{display:flex;flex-direction:column;gap:12px;flex-shrink:0}.list-toolbar{display:flex;justify-content:space-between;align-items:center;gap:25px;margin:24px 0}.list-toolbar h2{font-size:18px}.list-toolbar input{max-width:240px;margin:0}.count{font:10px var(--mono);padding:4px 8px;background:#e4ebda;margin-left:10px}.node-grid,.docs-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px}.node-card>svg{color:#839968;width:28px;height:28px;margin-bottom:25px}.node-card h3{font-size:17px;margin-bottom:14px}.node-meta{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding-top:17px;margin-top:25px;font:10px var(--mono);color:var(--muted)}.ticket-form{margin-bottom:25px}.ticket-form .panel-title h2{font-size:17px}.ticket-list{padding:0}.ticket-row{display:flex;width:100%;text-align:left;align-items:center;gap:25px;padding:25px;border-bottom:1px solid var(--line)}.ticket-row:last-child{border:0}.ticket-row>.mono{font-size:10px;color:var(--muted)}.ticket-row div{flex:1}.ticket-row b{font-size:14px}.ticket-row small{display:block;font-size:10px;margin-top:8px;color:var(--muted)}.ticket-row>svg{width:18px;height:18px}.message{margin:20px 0;border-left:2px solid #c1d99b;padding:15px 20px;background:#edf3e3}.message.from-me{background:#f0f0eb;border-color:#a6ae9b}.message>.mono{font-size:9px;color:var(--muted)}.message p{font-size:13px;line-height:1.9;margin-top:12px;white-space:pre-wrap;overflow-wrap:anywhere}.conversation .panel-title h2{font-size:20px}.article h2{font-size:28px;margin:25px 0}.doc-card .eyebrow{font-size:9px}.doc-card h2{font-size:20px;margin:24px 0 30px}.doc-card:hover{border-color:#90b951}.doc-card .text-button{font-size:11px}.invite-hero{position:relative;overflow:hidden;background:var(--ink);color:var(--paper);padding:35px;display:flex;justify-content:space-between;border-radius:4px}.invite-hero .eyebrow{color:#95a984;font-size:9px}.invite-hero h2{font-size:44px;line-height:1.45;margin:20px 0;font-weight:800;letter-spacing:-1px}.invite-hero p{font-size:12px;color:#a9b69d;margin-bottom:24px}.invite-art{font-size:150px;line-height:.75;color:var(--lime);position:absolute;right:15%;top:35px;transform:rotate(-12deg);font-weight:300}.invite-row{display:flex;justify-content:space-between;align-items:center;padding:20px 0;border-top:1px solid var(--line);gap:20px}.invite-row>.mono{font-size:18px;letter-spacing:3px}
|
||||
@media(min-width:1600px){.sidebar{width:254px;padding-left:30px;padding-right:30px}.work-main{margin-left:254px;width:calc(100% - 254px)}}
|
||||
@media(max-width:1100px){.hero-actions{align-items:flex-start;flex-direction:column;gap:12px}.hero-foot span:last-child{display:none}.hero h1{font-size:76px}.hero{min-height:630px}.orbit-svg{min-height:560px}.dashboard-grid{grid-template-columns:1.2fr 1fr;gap:16px}.panel{padding:21px}.usage-body{gap:13px}.usage-ring{width:96px;height:96px;padding:8px}.usage-numbers strong{font-size:20px}.connection-card h2{font-size:25px}.connection-bottom>.mono{display:none}.page-heading h1{font-size:31px}.sidebar{width:204px;padding-left:15px;padding-right:15px}.work-main{margin-left:204px;width:calc(100% - 204px)}.account-grid{grid-template-columns:.85fr 1.5fr}.auth-main{padding:40px 10%}.auth-art{padding:45px 10%}.subscribe-panel{align-items:flex-start}.subscription-actions .button{font-size:11px;padding:13px}.stat-strip>div{padding:23px 20px}.lower-grid{gap:16px}.quick-row p{font-size:9px}.plan-grid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}.plan-card{padding:22px}}
|
||||
@media(max-width:850px){.dashboard-grid,.lower-grid{grid-template-columns:1fr}.usage-body{justify-content:space-between;padding:6px 25px 20px}.usage-ring{width:110px;height:110px}.usage-numbers{gap:13px}.usage-numbers strong{font-size:27px}.connection-card{min-height:260px}.connection-card h2{font-size:30px}.connection-bottom>.mono{display:block}.account-grid,.checkout-grid{grid-template-columns:1fr}.account-profile{display:none}.account-settings .panel{padding:25px}.page-heading h1{font-size:28px}.page-heading .number-tag{display:none}.subscribe-panel{flex-direction:column}.subscription-actions{flex-direction:row;width:100%}.subscription-actions .button{flex:1}.manifesto{gap:30px}.manifesto h2{font-size:30px}.start-panel h2{font-size:48px}.start-mark{font-size:245px;right:25px;top:60px}.hero h1{font-size:65px;letter-spacing:-4px}.hero-art{margin:20px}.hero-copy{padding:50px 0 0 10%}.hero .eyebrow{font-size:9px}.art-caption{left:18px;top:20px;font-size:10px}.hero-copy>p{font-size:14px}.orbit-svg{min-height:500px}.hero{min-height:590px}.brand-band{font-size:17px}.auth-layout{grid-template-columns:40% 60%}.auth-slogan{font-size:35px}.auth-main{padding:30px 10%}.auth-form h1{font-size:27px}.auth-art .brand{font-size:23px}.auth-diagram{width:220px;height:220px;right:-50px}.auth-diagram>span{top:95px;left:80px}.auth-art>.mono{font-size:7px}.field-pair{gap:13px}}
|
||||
@media(max-width:650px){.landing-nav{height:80px;padding:0 6%}.landing-nav .brand{font-size:22px}.landing-nav .brand img{width:30px;height:30px}.landing-nav nav{display:none}.nav-enter{font-size:11px;gap:12px}.hero{grid-template-columns:1fr}.hero-copy{padding:44px 7% 0}.hero h1{font-size:74px;letter-spacing:-5px}.hero-actions{flex-direction:row;align-items:center;gap:20px;margin-bottom:32px}.hero-actions .text-button{font-size:11px}.hero-copy>p{font-size:15px}.hero-art{margin:0 7% 30px;height:365px}.orbit-svg{min-height:0}.art-note{bottom:18px;font-size:8px}.brand-band{padding:20px;font-size:14px;gap:12px;overflow:hidden;white-space:nowrap}.brand-band span:last-child{display:none}.band-star{font-size:25px}.manifesto{padding:55px 7%;grid-template-columns:1fr;gap:28px}.manifesto h2{font-size:31px;margin-top:20px}.principles article{gap:20px}.principles h3{font-size:16px}.principles p{font-size:13px}.start-panel{margin:0 7% 30px;padding:33px;min-height:370px}.start-panel h2{font-size:46px;position:relative;z-index:1}.start-mark{font-size:230px;right:-15px;top:105px;opacity:.3}.start-panel .button{position:relative;z-index:1}.landing-footer{flex-wrap:wrap;gap:22px;padding:30px 7%}.landing-footer .brand{font-size:24px}.landing-footer>span:nth-child(2){order:3;width:100%;font-size:10px}.sidebar{transform:translateX(-100%);transition:transform .15s;width:232px;padding:35px 20px;box-shadow:none}.sidebar.open{transform:translateX(0);box-shadow:0 0 0 100vw #0007}.work-main{margin-left:0;width:100%}.mobile-nav{display:flex;position:fixed;top:17px;left:15px;width:34px;height:34px;align-items:center;justify-content:center;z-index:30;background:var(--paper);border-radius:3px;border:1px solid var(--line)}.work-top{height:67px;padding:0 6% 0 65px}.work-top .mono{font-size:8px}.top-help{font-size:10px;gap:5px}.top-help svg{display:none}.work-main main{padding:29px 6% 35px}.page-heading{gap:15px;margin-bottom:25px;align-items:flex-start}.page-heading h1{font-size:27px;letter-spacing:-1px;margin:13px 0 10px}.page-heading .eyebrow{font-size:8px}.page-heading p{font-size:12px}.page-heading>.button{font-size:10px;min-height:38px;padding:10px 12px;gap:5px}.page-heading>.button svg{width:13px;height:13px}.page-heading>.text-button{font-size:10px;max-width:85px}.page-heading .icon-button{margin-top:6px;flex-shrink:0}.dashboard-grid,.lower-grid{gap:18px}.connection-card{padding:24px;min-height:260px}.connection-card h2{font-size:29px;max-width:280px}.connection-top .eyebrow{font-size:8px}.connection-bottom>.mono{font-size:6px}.usage-body{justify-content:flex-start;gap:28px;padding:10px 10px 22px}.usage-ring{width:120px;height:120px}.stat-strip{grid-template-columns:1fr;margin:18px 0}.stat-strip>div{border-right:0;border-bottom:1px solid var(--line);padding:20px 23px;display:grid;grid-template-columns:1fr auto;gap:10px}.stat-strip strong{font-size:25px;grid-column:2;grid-row:1 / span 2;align-self:center}.stat-strip strong.small-value{font-size:16px;padding:0;max-width:150px;min-height:0}.stat-strip small{grid-column:1;font-size:9px}.quick-row{gap:12px}.quick-row b{font-size:12px}.quick-row p{font-size:10px}.panel-title .mono{font-size:7px}.work-footer{font-size:8px;padding:22px 6%;flex-wrap:wrap}.work-footer>span:nth-child(2){display:none}.auth-layout{grid-template-columns:1fr}.auth-art{display:none}.auth-main{min-height:100vh;padding:30px 8%}.auth-form{margin:55px auto;max-width:430px}.auth-form h1{font-size:31px}.plan-grid{grid-template-columns:1fr}.plan-card{max-width:none;padding:28px}.plan-card h2{font-size:25px}.help-strip{font-size:11px;flex-direction:column;align-items:flex-start}.checkout-grid{gap:18px}.checkout-plan,.checkout-summary{padding:25px}.period-grid button{padding:16px}.account-settings .panel{padding:24px}.field-pair{grid-template-columns:1fr;gap:0}.field-pair label{margin-top:0}.field-pair label:first-child{margin-top:20px}.toggle-row small{font-size:10px;max-width:230px;line-height:1.7}.subscribe-panel{gap:23px}.subscribe-panel h2{font-size:23px}.subscription-actions{flex-direction:column}.subscription-actions .button{font-size:12px}.list-toolbar{gap:15px}.list-toolbar input{max-width:180px;font-size:11px}.list-toolbar h2{font-size:16px;white-space:nowrap}.node-grid,.docs-grid{grid-template-columns:1fr}.ticket-form .panel-title h2{font-size:15px;line-height:1.7}.ticket-row{padding:20px;gap:12px}.ticket-row b{font-size:12px}.ticket-row .status-pill{font-size:9px}.ticket-row>svg{width:14px}.conversation{padding:23px}.conversation .panel-title h2{font-size:18px}.message{padding:15px}.invite-hero{padding:28px}.invite-hero h2{font-size:38px}.invite-art{font-size:120px;right:-15px;top:90px;opacity:.4}.invite-hero>div{position:relative;z-index:1}.invite-hero p{max-width:240px;line-height:1.8}.invite-row{gap:10px}.invite-row>.mono{font-size:15px}.invite-row .button{font-size:10px;padding:12px;gap:7px}.toast{font-size:12px;min-width:260px;max-width:90vw;padding:15px}.toast button{margin-left:auto}}
|
||||
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
|
||||
|
||||
.mail-login{margin-top:17px;color:var(--muted);font-size:11px}
|
||||
|
||||
.confirm-dialog{background:var(--paper);border:1px solid var(--line);border-radius:4px;padding:32px;width:min(430px,90vw);color:var(--ink)}.confirm-dialog::backdrop{background:#101b10a6}.confirm-dialog h2{font-size:24px;margin:20px 0}.confirm-dialog p{font-size:14px;line-height:1.8;color:var(--muted);margin-bottom:28px}.confirm-dialog .form-actions{justify-content:flex-end;gap:12px}
|
||||
@@ -0,0 +1,7 @@
|
||||
import {test} from 'node:test';import assert from 'node:assert/strict';
|
||||
const storage=()=>{const values=new Map();return {getItem:key=>values.get(key)||null,setItem:(key,value)=>values.set(key,value),removeItem:key=>values.delete(key)};};
|
||||
globalThis.sessionStorage=storage();globalThis.localStorage=storage();globalThis.window=new EventTarget();
|
||||
const {api,state,signIn}=await import('../src/state.mjs');
|
||||
test('API never sends credentials to an arbitrary origin',async()=>{let calls=0;globalThis.fetch=async()=>{calls++;throw new Error('unexpected HTTP');};await assert.rejects(api('//external.example/path'),/接口地址无效/);assert.equal(calls,0);});
|
||||
test('authenticated requests use same-origin APIs and preserve structured errors',async()=>{signIn('Bearer local-test');globalThis.fetch=async(path,options)=>{assert.equal(path,'/api/v1/user/info');assert.equal(options.headers.Authorization,'Bearer local-test');assert.equal(options.redirect,'error');return {ok:false,status:422,json:async()=>({message:'invalid',errors:{email:['邮箱格式不正确']}})};};await assert.rejects(api('/user/info'),/邮箱格式不正确/);});
|
||||
test('a stale expired request cannot sign out a newer session',async()=>{signIn('Bearer old-local-test');let resolve;globalThis.fetch=()=>new Promise(done=>resolve=done);const pending=api('/user/info');signIn('Bearer new-local-test');resolve({ok:false,status:401,json:async()=>({message:'Unauthorized'})});await assert.rejects(pending,/Unauthorized/);assert.equal(state.token,'Bearer new-local-test');});
|
||||
@@ -0,0 +1,5 @@
|
||||
import {test} from 'node:test';import assert from 'node:assert/strict';import {money,usage,planPeriods,safeLink,statusLabel} from '../src/core.mjs';
|
||||
test('amounts stay in cents, including zero-price periods',()=>{assert.equal(money(1900),'19.00');assert.equal(money(0),'0.00');assert.deepEqual(planPeriods({month_price:0,year_price:1900,quarter_price:null}),['month_price','year_price']);});
|
||||
test('traffic meters handle empty, exhausted and over-quota subscriptions',()=>{assert.deepEqual(usage(null),{total:0,used:0,remaining:0,percent:0});assert.equal(usage({transfer_enable:100,u:70,d:50}).remaining,0);assert.equal(usage({transfer_enable:100,u:70,d:50}).percent,100);assert.equal(usage({transfer_enable:100,u:20,d:5}).percent,25);});
|
||||
test('payment links reject executable and malformed protocols',()=>{assert.equal(safeLink('javascript:alert(1)','https://hardnerd.net'),null);assert.equal(safeLink('data:text/html,payment','https://hardnerd.net'),null);assert.equal(safeLink('https://pay.example.test/order','https://hardnerd.net'),'https://pay.example.test/order');assert.equal(safeLink('/orders','https://hardnerd.net'),'https://hardnerd.net/orders');});
|
||||
test('order labels preserve backend state meanings',()=>{assert.equal(statusLabel(0),'待支付');assert.equal(statusLabel(2),'已取消');assert.equal(statusLabel(3),'已完成');assert.equal(statusLabel(999),'未知状态');});
|
||||
@@ -0,0 +1,18 @@
|
||||
import {defineConfig} from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
const root=path.dirname(fileURLToPath(import.meta.url));
|
||||
const backend=path.resolve(root,'../..');
|
||||
const marker=path.join(backend,'storage/framework/hardnerd-vite.hot');
|
||||
export default defineConfig(({mode})=>({
|
||||
root,envDir:false,publicDir:false,base:mode==='production'?'/theme/Hardnerd/assets/':'/',
|
||||
plugins:[vue(),{name:'hardnerd-local-preview',configureServer(server){
|
||||
server.httpServer?.once('listening',()=>{fs.mkdirSync(path.dirname(marker),{recursive:true});fs.writeFileSync(marker,'http://127.0.0.1:5175');});
|
||||
server.httpServer?.once('close',()=>{if(fs.existsSync(marker))fs.unlinkSync(marker);});
|
||||
}}],
|
||||
resolve:{dedupe:['vue']},
|
||||
build:{outDir:path.join(backend,'theme/Hardnerd/assets'),assetsDir:'chunks',manifest:true,emptyOutDir:true,sourcemap:false},
|
||||
server:{host:'127.0.0.1',port:5175,strictPort:true,origin:'http://127.0.0.1:5175',cors:{origin:/^http:\/\/(127\.0\.0\.1|localhost|hn\.loc)(:\d+)?$/},fs:{allow:[root,path.join(backend,'frontends/node_modules')],deny:['**/.env','**/.env.*','**/.git','**/.git/**','**/.npmrc']},proxy:{'/api':'http://127.0.0.1:8591','/brand':'http://127.0.0.1:8591'}}
|
||||
}));
|
||||
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<div class="hn-welcome-lines">
|
||||
<div class="hn-welcome-notice">
|
||||
<svg width="19" height="19" viewBox="0 0 24 24" fill="none" aria-hidden="true" class="hn-warning">
|
||||
<path d="M11 3h2l9 16-1 2H3l-1-2 9-16Z" fill="currentColor" fill-opacity=".1" stroke="currentColor" stroke-width="1.6" />
|
||||
<path d="M12 8v6" stroke="currentColor" stroke-width="2" stroke-linecap="square" />
|
||||
<path d="M11 16h2v2h-2z" fill="currentColor" />
|
||||
</svg>
|
||||
<p v-if="parts.length > 1">{{ parts[0] }}<span class="hn-email-wrap"><button type="button" class="hn-email" aria-label="复制邮箱地址 [email protected]" @click="copyEmail"><svg class="hn-copy-icon" width="15" height="15" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M8 8h9l3 3v10H8V8Z" stroke="currentColor" stroke-width="1.7" stroke-linejoin="miter"/><path d="M15 8V3H3v13h5" stroke="currentColor" stroke-width="1.7" stroke-linejoin="miter"/></svg>{{ email }}</button><span v-if="feedback" class="hn-copy-feedback" role="status">{{ feedback }}</span></span>{{ parts.slice(1).join(email) }}</p>
|
||||
<p v-else>{{ t('dashboard.welcomeDesc') }}</p>
|
||||
</div>
|
||||
<div class="hn-welcome-notice hn-tutorial-row">
|
||||
<svg width="19" height="19" viewBox="0 0 24 24" fill="none" aria-hidden="true" class="hn-signpost">
|
||||
<path d="M8 16v-2L4 10V7l4-4h8l4 4v3l-4 4v2H8Z" fill="currentColor" fill-opacity=".1" stroke="currentColor" stroke-width="1.6" stroke-linejoin="miter" />
|
||||
<path d="M9 18.5h6M10 21h4M10 9l2 2 2-2M12 11v5" stroke="currentColor" stroke-width="1.6" stroke-linecap="square" />
|
||||
</svg>
|
||||
<p>新手不会使用?请查看<RouterLink class="hn-tutorial-link" to="/docs/1"><svg class="hn-tutorial-icon" width="15" height="15" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M12 2v20M3 5h15l4 4-4 4H3V5Z" stroke="currentColor" stroke-width="1.6" stroke-linejoin="miter"/><path d="M6 9h10M10 22h4" stroke="currentColor" stroke-width="1.6"/></svg>新手指引</RouterLink>。</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, onBeforeUnmount, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { RouterLink } from 'vue-router';
|
||||
const { t } = useI18n();
|
||||
const email = '[email protected]';
|
||||
const parts = computed(() => t('dashboard.welcomeDesc').split(email));
|
||||
const feedback = ref('');
|
||||
let timer;
|
||||
async function copyEmail() {
|
||||
let copied = false;
|
||||
if (navigator.clipboard?.writeText) {
|
||||
try { await navigator.clipboard.writeText(email); copied = true; } catch { /* Use the local HTTP fallback. */ }
|
||||
}
|
||||
if (!copied) {
|
||||
const previous = document.activeElement;
|
||||
const field = document.createElement('textarea');
|
||||
field.value = email;
|
||||
field.setAttribute('readonly', '');
|
||||
field.style.cssText = 'position:fixed;left:-9999px;top:0';
|
||||
document.body.appendChild(field);
|
||||
try { field.focus({ preventScroll: true }); field.select(); field.setSelectionRange(0, email.length); copied = document.execCommand('copy'); } catch { copied = false; }
|
||||
finally { field.remove(); previous?.focus?.({ preventScroll: true }); }
|
||||
}
|
||||
feedback.value = copied ? '已复制' : '复制失败,请手动复制';
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(() => { feedback.value = ''; }, 2200);
|
||||
}
|
||||
onBeforeUnmount(() => clearTimeout(timer));
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.hn-welcome-lines { display:grid; gap:9px; }
|
||||
.hn-signpost { flex:0 0 19px; margin-bottom:5px; color:var(--theme-color,#a3cc4b); }
|
||||
.hn-tutorial-icon { flex:0 0 15px; }
|
||||
.hn-tutorial-link { display:inline-flex; align-items:center; gap:4px; vertical-align:baseline; margin-left:4px; color:var(--theme-color,#a3cc4b); font-weight:600; text-decoration:none; }
|
||||
.hn-tutorial-link:hover { text-decoration:underline; text-underline-offset:3px; }
|
||||
.hn-tutorial-link:focus-visible { outline:2px solid var(--theme-color,#a3cc4b); outline-offset:3px; }
|
||||
.hn-welcome-notice { display:flex; align-items:flex-end; gap:7px; line-height:1.8; }
|
||||
.hn-warning { flex:0 0 19px; margin-bottom:5px; color:#e4bc58; }
|
||||
p { margin:0; }
|
||||
.hn-email-wrap { position:relative; display:inline-block; }
|
||||
.hn-copy-icon { flex:0 0 15px; }
|
||||
.hn-email { display:inline-flex; align-items:center; gap:4px; vertical-align:baseline; padding:0; border:0; border-radius:2px; background:none; color:var(--theme-color,#a3cc4b); font:inherit; font-weight:600; cursor:pointer; }
|
||||
.hn-email:hover { text-decoration:underline; text-underline-offset:3px; }
|
||||
.hn-email:focus-visible { outline:2px solid var(--theme-color,#a3cc4b); outline-offset:3px; }
|
||||
.hn-copy-feedback { position:absolute; left:50%; bottom:calc(100% + 5px); transform:translateX(-50%); padding:2px 8px; border:1px solid var(--theme-color,#a3cc4b); border-radius:4px; background:var(--card-bg,#202429); color:var(--theme-color,#a3cc4b); font-size:12px; font-weight:500; white-space:nowrap; pointer-events:none; }
|
||||
</style>
|
||||
@@ -0,0 +1 @@
|
||||
<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>hardnerd</title><link rel="icon" href="/brand/hn/logo.svg"></head><body><div id="app"></div><script type="module" src="/main.js"></script></body></html>
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
import '../ez-theme/src/main.js';
|
||||
@@ -0,0 +1,18 @@
|
||||
export const paymentModalMessages = {
|
||||
'zh-CN': ['请在收银台扫描二维码完成支付', '前往收银台'],
|
||||
'zh-TW': ['請在收銀台掃描二維碼完成付款', '前往收銀台'],
|
||||
'en-US': ['Scan the QR code at checkout to complete payment.', 'Open checkout'],
|
||||
};
|
||||
|
||||
export function adaptPaymentModal(code) {
|
||||
const prompt = "{{ $t('payment.scan_qrcode') }}";
|
||||
if (!code.includes(prompt)) throw new Error('HN payment modal prompt changed upstream');
|
||||
code = code.replace(prompt, "{{ paymentQRCode ? $t('payment.scan_qrcode') : $t('payment.open_cashier_notice') }}")
|
||||
.replace("{{ $t('payment.open_in_new_tab') }}", "{{ $t('payment.open_cashier_button') }}");
|
||||
return code + `
|
||||
<style scoped>
|
||||
.payment-container .modal-wrapper > .modal-container { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0; border-radius: 20px; }
|
||||
.payment-container .modal-wrapper .modal-card { background-color: var(--card-background) !important; border: 1px solid var(--card-border-color, var(--border-color)) !important; border-radius: 20px; }
|
||||
</style>
|
||||
`;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
export function adaptConfig(original, settings, location) {
|
||||
const config = structuredClone(original);
|
||||
config.PANEL_TYPE = 'Xboard';
|
||||
config.API_CONFIG = {urlMode: 'auto', showCheckBackend: false, staticBaseUrl: [], autoConfig: {useSameProtocol: true, appendApiPath: true, apiPath: '/api/v1'}};
|
||||
config.API_MIDDLEWARE_ENABLED = false;
|
||||
config.API_MIDDLEWARE_URL = '';
|
||||
config.API_MIDDLEWARE_KEY = '';
|
||||
config.SITE_CONFIG.siteName = settings.title || 'hardnerd';
|
||||
config.SITE_CONFIG.siteDescription = settings.description || 'hardnerd · 探索全球网络';
|
||||
config.SITE_CONFIG.copyright = `© ${new Date().getFullYear()} ${settings.full_name || 'hardnerd.net'}`;
|
||||
config.SITE_CONFIG.customLandingPage = '';
|
||||
config.DEFAULT_CONFIG.defaultTheme = 'dark';
|
||||
config.DEFAULT_CONFIG.primaryColor = '#8bcf36';
|
||||
config.AUTH_LAYOUT_CONFIG.splitLayout.leftContent.backgroundImage = '';
|
||||
config.AUTHORIZED_DOMAINS = [location.hostname];
|
||||
config.SHOP_CONFIG.showPlanFeatureCards = false;
|
||||
config.SHOP_CONFIG.popup.enabled = false;
|
||||
config.ORDER_CONFIG.confirmOrder = false;
|
||||
config.ORDER_CONFIG.confirmOrderContent = "";
|
||||
config.CLIENT_CONFIG.showDownloadCard = false;
|
||||
config.CLIENT_CONFIG.clientLinks = {};
|
||||
config.PROFILE_CONFIG.showRecentDevices = false;
|
||||
config.CUSTOMER_SERVICE_CONFIG.enabled = false;
|
||||
config.TICKET_CONFIG.isImageHosting = false;
|
||||
config.TICKET_CONFIG.imggbKey = '';
|
||||
config.MORE_PAGE_CONFIG.enableCustomCards = false;
|
||||
config.MORE_PAGE_CONFIG.customCards = [];
|
||||
const scrub = value => {
|
||||
if (typeof value === 'string' && /ezdemo\.xyz|loliapi\.com|t\.me\/your_|github\.com\/xxx|store\/apps\/xxx|\/app\/xxx/.test(value)) return '';
|
||||
if (Array.isArray(value)) return value.map(scrub);
|
||||
if (value && typeof value === 'object') return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, scrub(item)]));
|
||||
return value;
|
||||
};
|
||||
return scrub(config);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import {test} from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import fs from 'node:fs';
|
||||
import vm from 'node:vm';
|
||||
import {adaptConfig} from '../runtime-config.mjs';
|
||||
const source=fs.readFileSync(new URL('../../ez-theme/src/config/index.js',import.meta.url),'utf8').replace('export const config','const config');
|
||||
const window={}; vm.runInNewContext(source,{window});
|
||||
|
||||
test('HN uses same-origin Xboard API and never inherits EZ demo services',()=>{
|
||||
const config=adaptConfig(window.EZ_CONFIG,{title:'hardnerd',full_name:'hardnerd.net'},{hostname:'127.0.0.1'});
|
||||
assert.equal(config.PANEL_TYPE,'Xboard');
|
||||
assert.equal(config.API_CONFIG.urlMode,'auto');
|
||||
assert.deepEqual(config.API_CONFIG.staticBaseUrl,[]);
|
||||
assert.equal(config.API_CONFIG.autoConfig.apiPath,'/api/v1');
|
||||
assert.equal(config.SITE_CONFIG.siteName,'hardnerd');
|
||||
assert.equal(config.CUSTOMER_SERVICE_CONFIG.enabled,false);
|
||||
assert.equal(config.TICKET_CONFIG.isImageHosting,false);
|
||||
assert.equal(config.CLIENT_CONFIG.showDownloadCard,false);
|
||||
assert.doesNotMatch(JSON.stringify(config),/ezdemo\.xyz|loliapi\.com|t\.me\/your_|github\.com\/xxx/);
|
||||
assert.equal(window.EZ_CONFIG.PANEL_TYPE,'Xiao-V2board');
|
||||
});
|
||||
@@ -0,0 +1,71 @@
|
||||
import {defineConfig} from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import fs from 'node:fs';
|
||||
import {adaptPaymentModal, paymentModalMessages} from './payment-modal.mjs';
|
||||
import path from 'node:path';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
const root = path.dirname(fileURLToPath(import.meta.url));
|
||||
const backend = path.resolve(root, '../..');
|
||||
const upstream = path.resolve(root, '../ez-theme');
|
||||
const upstreamConfig = path.join(upstream, 'src/config/index.js');
|
||||
const marker = path.join(backend, 'storage/framework/ez-vite.hot');
|
||||
export default defineConfig(({mode}) => ({
|
||||
root, envDir: false, base: mode === 'production' ? '/theme/EZ/assets/' : '/__hn_vite/', publicDir: false,
|
||||
plugins: [{name:'hn-ez-adapter', enforce:'pre',
|
||||
load(id) {
|
||||
if (id === upstreamConfig) return `import {config as original} from ${JSON.stringify(upstreamConfig+'?hn-base')}; import {adaptConfig} from ${JSON.stringify(path.join(root,'runtime-config.mjs'))}; export const config=adaptConfig(original,window.settings||{},window.location);`;
|
||||
},
|
||||
transform(code, id) {
|
||||
if (!id.startsWith(upstream + '/src/')) return;
|
||||
code = code.replaceAll('src="/images/logo.png"', ':src="hnLogo"').replaceAll('/images/logo.png', '/brand/hn/logo.svg');
|
||||
if (id === path.join(upstream,'src/views/shop/Payment.vue')) code = adaptPaymentModal(code);
|
||||
const paymentLocale = Object.keys(paymentModalMessages).find(locale => id === path.join(upstream, 'src/i18n/locales', locale + '.js'));
|
||||
if (paymentLocale) {
|
||||
const [notice, button] = paymentModalMessages[paymentLocale];
|
||||
code = code.replace(/(\s+scan_qrcode:)/, `\n open_cashier_notice: ${JSON.stringify(notice)},\n open_cashier_button: ${JSON.stringify(button)},$1`);
|
||||
}
|
||||
if (id === path.join(upstream,'src/views/shop/Shop.vue')) {
|
||||
code = code.replace('v-for="(price, type) in getPlanPrices(plan)"', 'v-for="(price, type) in Object.fromEntries(Object.entries(getPlanPrices(plan)).filter(([, price]) => price !== null))"');
|
||||
}
|
||||
if (id === path.join(upstream,'src/i18n/locales/zh-CN.js')) {
|
||||
code = code.replaceAll('商店', '购买套餐')
|
||||
.replace("welcome: '欢迎回来'", "welcome: '欢迎来到 hardnerd'")
|
||||
.replace("siteAnnouncement: '网站公告'", "siteAnnouncement: '公告'")
|
||||
.replace("welcomeDesc: '查看您的服务和使用情况'", "welcomeDesc: '务必,请收藏我们的邮箱地址:[email protected],当前域名被墙时,可以发送任意邮件至该邮箱,将自动回复最新地址。'");
|
||||
}
|
||||
if (id === path.join(upstream,'src/views/dashboard/Dashboard.vue')) {
|
||||
code = code.replace(`<p class="">{{ $t('dashboard.welcomeDesc') }}</p>`, '<HnWelcomeNotice />')
|
||||
.replace('<script>', `<script>\nimport HnWelcomeNotice from ${JSON.stringify(path.join(root,'components/HnWelcomeNotice.vue'))};`)
|
||||
.replace('components: {', 'components: { HnWelcomeNotice,');
|
||||
code += '\n<style scoped>\n.stats-card.doc-card::after { content: none; animation: none; }\n</style>\n';
|
||||
}
|
||||
if (id === path.join(upstream,'src/components/common/Toast.vue')) {
|
||||
code += '\n<style scoped>\n.toast.toast-info { --info-color: var(--theme-color, #8bcf36); }\n</style>\n';
|
||||
}
|
||||
if (id === path.join(upstream,'src/components/common/LanguageSelector.vue')) {
|
||||
code = code.replace('<span :key="currentLanguage" class="flag-container" v-html="getCurrentLanguageFlag()"></span>', `<span :key="currentLanguage" class="hn-language-code" style="font-size:13px;font-weight:700;letter-spacing:.5px">{{ ({'zh-CN':'CN','zh-TW':'TW','en-US':'EN','ja-JP':'JP','ko-KR':'KR','ru-RU':'RU','fa-IR':'IR','vi-VN':'VN'})[currentLanguage] || 'EN' }}</span>`);
|
||||
code = code.replace('<style', `<style>
|
||||
.language-btn.language-btn { transition: all .3s ease; }
|
||||
.language-btn .hn-language-code { color: inherit; }
|
||||
.language-btn.language-btn:hover, .language-btn.language-btn:focus-visible { color: var(--theme-color, #a3cc4b); }
|
||||
.language-btn.language-btn:active { transform: translateY(0); transition: all .1s ease; }
|
||||
</style>
|
||||
<style`);
|
||||
}
|
||||
if (id === path.join(upstream,'src/appInit.js')) code = code.replace("app.mount('#app');", "app.config.globalProperties.hnLogo = window.settings?.logo || '/brand/hn/logo.svg'; app.mount('#app');");
|
||||
if (id === path.join(upstream,'src/api/user.js')) code = code.replace(/export function getIpLocationInfo\(\)\s*\{[\s\S]*?\n\}/, 'export function getIpLocationInfo() { return Promise.resolve({data: null}); }');
|
||||
return code;
|
||||
},
|
||||
configureServer(server) {
|
||||
server.httpServer?.once('listening', () => {fs.mkdirSync(path.dirname(marker), {recursive:true}); fs.writeFileSync(marker,'http://hn.loc/__hn_vite');});
|
||||
server.httpServer?.once('close', () => {if(fs.existsSync(marker))fs.unlinkSync(marker);});
|
||||
}
|
||||
}, vue({template:{transformAssetUrls:{includeAbsolute:false}}})],
|
||||
resolve:{alias:{'@':path.join(upstream,'src')}, dedupe:['vue']},
|
||||
define:{'process.env':{NODE_ENV:mode,VUE_APP_CONFIGJS:'false',VUE_APP_DEBUGGING:'false'},__VUE_OPTIONS_API__:true,__VUE_PROD_DEVTOOLS__:false,__VUE_PROD_HYDRATION_MISMATCH_DETAILS__:false},
|
||||
css:{preprocessorOptions:{scss:{additionalData:'@use "@/assets/styles/base/variables.scss" as *;'}}},
|
||||
optimizeDeps:{include:['axios','vue','vue-router','pinia','vue-i18n']},
|
||||
build:{outDir:path.join(backend,'theme/EZ/assets'),assetsDir:'chunks',manifest:true,emptyOutDir:true,sourcemap:false},
|
||||
server:{host:'127.0.0.1',port:5184,strictPort:true,origin:'http://hn.loc',allowedHosts:['hn.loc'],hmr:{host:'hn.loc',clientPort:80},cors:{origin:/^http:\/\/(127\.0\.0\.1|localhost|hn\.loc)(:\d+)?$/},
|
||||
fs:{allow:[path.resolve(root,'..')],deny:['**/.env','**/.env.*','**/.git','**/.git/**','**/.npmrc']},proxy:{'/api':'http://127.0.0.1:8592','/brand':'http://127.0.0.1:8592'}}
|
||||
}));
|
||||
Generated
+7492
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"name": "dpl-shared-frontends",
|
||||
"version": "v0.4.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev:hn": "vite --config hn/vite.config.mjs",
|
||||
"build:hn": "vite build --config hn/vite.config.mjs",
|
||||
"test:hn": "node --test hn/tests/*.test.mjs",
|
||||
"dev:hardnerd": "vite --config hardnerd/vite.config.mjs",
|
||||
"build:hardnerd": "vite build --config hardnerd/vite.config.mjs",
|
||||
"test:hardnerd": "node --test hardnerd/tests/*.test.mjs",
|
||||
"dev:design": "npm run dev:tpl-a",
|
||||
"build:design": "npm run build:tpl-a",
|
||||
"dev:tpl-a": "npm --prefix tpl-a run dev",
|
||||
"build:tpl-a": "npm --prefix tpl-a run build"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"description": "",
|
||||
"dependencies": {
|
||||
"@originjs/crypto-js-wasm": "^1.1.1",
|
||||
"@tabler/icons-vue": "^3.30.0",
|
||||
"@vue/compat": "^3.5.13",
|
||||
"@vue/runtime-core": "^3.5.13",
|
||||
"@vue/runtime-dom": "^3.5.13",
|
||||
"@vue/shared": "^3.5.13",
|
||||
"@vueuse/core": "^13.0.0",
|
||||
"@vueuse/motion": "^3.0.3",
|
||||
"aieditor": "^1.4.1",
|
||||
"axios": "^0.27.2",
|
||||
"chart.js": "^3.9.1",
|
||||
"core-js": "^3.25.0",
|
||||
"crisp": "^1.0.0",
|
||||
"crisp-sdk-web": "^1.0.25",
|
||||
"crypto-js": "^4.2.0",
|
||||
"disable-devtool": "^0.3.9",
|
||||
"dompurify": "^3.2.4",
|
||||
"echarts": "^5.6.0",
|
||||
"jsencrypt": "^3.3.2",
|
||||
"markdown-it": "^14.1.0",
|
||||
"marked": "^15.0.7",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinia": "^3.0.3",
|
||||
"postscribe": "^2.0.8",
|
||||
"qrcode": "^1.5.4",
|
||||
"qrcode.vue": "^3.6.0",
|
||||
"shepherd.js": "^14.5.0",
|
||||
"vue-confetti": "^2.3.0",
|
||||
"vue-confetti-explosion": "^1.0.2",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-markdown-render": "^2.2.1",
|
||||
"vue-router": "^4.5.0",
|
||||
"vue-shepherd": "^5.0.1",
|
||||
"vue3-qrcode": "^0.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@vitejs/plugin-vue": "^5.2.4",
|
||||
"@vue/compiler-sfc": "^3.2.37",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"javascript-obfuscator": "^4.1.1",
|
||||
"postcss": "^8.5.3",
|
||||
"postcss-import": "^16.1.0",
|
||||
"sass": "^1.69.5",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"terser": "^5.47.1",
|
||||
"vite": "^6.3.5",
|
||||
"vitest": "^3.1.4",
|
||||
"vue": "^3.5.18"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
/dist/
|
||||
/node_modules/
|
||||
@@ -0,0 +1,10 @@
|
||||
# tpl-a 机房主视觉素材
|
||||
|
||||
- 方式:内置 imagegen 工具。
|
||||
- 用途:本地纯前端设计预览首页;属于 AI 生成示意素材,不是 hn 实际机房照片。
|
||||
- 项目素材:[datacenter-hero-v1.png](public/datacenter-hero-v1.png)。原始文件另保留在 Codex generated_images,未覆盖或删除。
|
||||
- 消费位置:`src/operator.css` 中的 `.dc-hero`。
|
||||
|
||||
## 最终生成提示词
|
||||
|
||||
Use case: ads-marketing. Asset type: wide website hero background for a serious data-center network operator, HARDNERD. Primary request: architectural photograph of a modern working data center, real physical infrastructure and professional scale. Long rows of black enterprise server cabinets, fine perforated metal doors, neatly installed network equipment, restrained blue and amber status lights, overhead cable trays, clean cold aisle, polished dark floor. Photorealistic commercial architectural photography, realistic materials, strong depth and precise perspective, natural cool-white ceiling lighting, subtle cool blue reflections, no sci-fi. Composition: wide horizontal 16:9, server cabinets most prominent in right two-thirds, left third darker and less detailed to support white HTML headline overlay. Camera at human eye level, sophisticated industrial documentary mood. No people, no logos, no text, no watermark, no drawn diagrams, no cartoons, no neon laser trails. This is illustrative stock-style imagery, not an identified actual facility.
|
||||
@@ -0,0 +1,28 @@
|
||||
# tpl-a
|
||||
|
||||
版本:1.0.0。用户于 2026-10-14 确认当前效果可作为定稿方案保留,命名为 `tpl-a`,不限定用于 hn。
|
||||
|
||||
这是独立的机房网络运营商前端设计方案:写实机房首页、明暗主题、接入方案、服务控制台、网络资源、账单、文档、技术工单和账户页。设计已批准保存;业务代码接入与生产发布尚未完成。不得把设计定稿解释为可以直接上传到 Xboard 后台使用的完整主题包。
|
||||
|
||||
## 运行
|
||||
|
||||
依赖使用父级 `frontends/package.json` / lockfile 中的 Vue、Vite 与插件。父级依赖安装完成后:
|
||||
|
||||
```bash
|
||||
npm --prefix frontends/tpl-a run dev
|
||||
npm --prefix frontends/tpl-a run build
|
||||
```
|
||||
|
||||
预览地址 `http://127.0.0.1:8591/#/home`,只监听本机,构建输出 `dist/` 不纳入 Git。构建不会调用 Laravel,也不会发布到任何业务站点。
|
||||
|
||||
## 品牌与绑定
|
||||
|
||||
`template.json` 登记方案名、版本与批准状态,`site_binding:null` 表示尚未绑定 hn 或其他实例。当前 hardnerd.net / HN 文案为保留视觉效果的演示品牌;替换 `src/brand.mjs` 和 `public/logo.svg` 即可使用其他品牌。实例启动配置、数据库与 `SITE_THEME` 没有因保存本设计而切换。
|
||||
|
||||
所有价格、节点、流量和订单为演示;年付按演示月价 × 12 展示,不提交任何业务数据。AI 机房图为示意素材,生成来源与完整提示词见 [ASSETS](ASSETS.md)。
|
||||
|
||||
## 定稿保护
|
||||
|
||||
- 当前视觉作为 `tpl-a` v1.0.0 保存。新方向另建方案或版本,避免直接覆盖本定稿。
|
||||
- `approved-files.sha256.json` 记录本次运行源码与素材摘要,供恢复和核对;这不是业务测试或生产验收。
|
||||
- 本地 Git 提交保存源文件和素材;未推送、未部署。其他功能草稿与运行中的 dpl 独立保留。
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"template": "tpl-a",
|
||||
"version": "1.0.0",
|
||||
"approved_on": "2026-10-14",
|
||||
"sha256": {
|
||||
"index.html": "78eb443588cd1913b307132c77b3d75c1760b160a86538f565caa7e466796a25",
|
||||
"vite.config.mjs": "12553e80844906567b9494b54c74f9711a5e4cbd8474b6ac4e98d945513f0411",
|
||||
"package.json": "16c48a0e420149ae3068b477ed519e5056eedaed16ddf5eb297d2ce9bfd3c2dc",
|
||||
"template.json": "c964ca32de98070e6a6271dc4764bde0dbd863456eb52cfdb72a0ce64812220a",
|
||||
"src/App.vue": "a3eede460b8bb5af3a866c4b969d5a6e33b918e21ea51c24eb8945cf64a59c50",
|
||||
"src/NetworkLanding.vue": "9583744cb19ac97a47352536dcdf05ad1b626dcfb94ad663a74d20a639f8c212",
|
||||
"src/brand.mjs": "5929fc76144d3f638db021f097d9cfedfcb9637a4f20558cff178d0a519fb48c",
|
||||
"src/main.js": "c47b1a723188ca2ad18ab33f4b2c982b3113cc8a616772eb206196ed133d311d",
|
||||
"src/operator.css": "1037e5edbb19be5db3fb66a9f1efdc09f5da800fc63f088294472632eb8d7d3d",
|
||||
"public/datacenter-hero-v1.png": "0294026e45c0a3eff894c67e27bc8e2a393cb2ce6c6a15668c167ab93eda07ca",
|
||||
"public/logo.svg": "a5412a612aab7bb416e63dea3d1a636a6b307adf73e89ec961d45f958f652711"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<!doctype html><html lang="zh-CN" data-theme="dark" data-template="tpl-a"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="color-scheme" content="dark light"><title>hardnerd / 全球连接</title><link rel="icon" href="/logo.svg"></head><body><div id="app"></div><script type="module" src="/src/main.js"></script></body></html>
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "tpl-a",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --config vite.config.mjs",
|
||||
"build": "vite build --config vite.config.mjs"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M0 0h52l12 12v52H0z" fill="#f29656"/><text x="32" y="42" text-anchor="middle" font-family="Arial,sans-serif" font-weight="900" font-size="29" letter-spacing="-2" fill="#101d29">HN</text></svg>
|
||||
|
After Width: | Height: | Size: 262 B |
@@ -0,0 +1,67 @@
|
||||
<script setup>
|
||||
import {ref,computed,onMounted,onBeforeUnmount,watch} from 'vue';
|
||||
import NetworkLanding from './NetworkLanding.vue';
|
||||
import brand from './brand.mjs';
|
||||
const menu=[['dashboard','控制台'],['shop','接入方案'],['nodes','网络资源'],['orders','订单账单'],['docs','接入指南'],['tickets','技术工单'],['profile','账户设置']];
|
||||
const getView=()=>{const v=location.hash.replace(/^#\/?/,'');return menu.some(item=>item[0]===v)?v:'home';};
|
||||
const page=ref(getView()),theme=ref('dark'),mobileMenu=ref(false),notice=ref(''),selected=ref('STANDARD'),period=ref('month'),saved=ref(false),question=ref('');
|
||||
const title=computed(()=>menu.find(item=>item[0]===page.value)?.[1]||'机房网络运营商');
|
||||
const plans=[{id:'ENTRY',title:'基础接入',price:12,quota:60,speed:100,devices:2},{id:'STANDARD',title:'标准接入',price:24,quota:200,speed:300,devices:3},{id:'EXTENDED',title:'专业接入',price:48,quota:500,speed:500,devices:5}];
|
||||
const nodes=[['日本 · 东京','JP-TYO','AnyTLS','1.0×'],['新加坡','SG-SIN','Trojan','1.0×'],['美国 · 西海岸','US-WEST','AnyTLS','1.5×']];
|
||||
let timer;
|
||||
function sync(){page.value=getView();mobileMenu.value=false;window.scrollTo(0,0);}
|
||||
function changeTheme(){theme.value=theme.value==='dark'?'light':'dark';document.documentElement.dataset.theme=theme.value;}
|
||||
function inform(message='演示页面,不执行实际操作。'){notice.value=message;clearTimeout(timer);timer=setTimeout(()=>notice.value='',4000);}
|
||||
watch(page,()=>document.title=`${brand.name} / ${title.value}`,{immediate:true});
|
||||
onMounted(()=>{document.documentElement.dataset.theme='dark';window.addEventListener('hashchange',sync);});
|
||||
onBeforeUnmount(()=>{window.removeEventListener('hashchange',sync);clearTimeout(timer);});
|
||||
</script>
|
||||
<template>
|
||||
<div class="preview-notice"><div class="content-width">设计预览 · 机房影像与方案数据均为示意</div></div>
|
||||
<header class="site-header"><div class="content-width header-inner">
|
||||
<a href="#/home" class="brand" :aria-label="brand.domain+' 首页'"><span class="brand-symbol">{{brand.symbol}}</span><span class="brand-text"><strong>{{brand.name}}<span>{{brand.domainSuffix}}</span></strong><small>{{brand.description}}</small></span></a>
|
||||
<button class="mobile-menu" aria-label="网站菜单" :aria-expanded="mobileMenu" @click="mobileMenu=!mobileMenu">{{mobileMenu?'关闭 ×':'菜单 ☰'}}</button>
|
||||
<nav class="public-nav" :class="{expanded:mobileMenu}" aria-label="主导航"><a href="#/home" :class="{active:page==='home'}">首页</a><a href="#/nodes" :class="{active:page==='nodes'}">网络服务</a><a href="#/shop" :class="{active:page==='shop'}">接入方案</a><a href="#/docs" :class="{active:page==='docs'}">服务文档</a><a href="#/dashboard" class="mobile-console">控制台 →</a></nav>
|
||||
<div class="header-tools"><button class="theme-button" :aria-label="theme==='dark'?'切换浅色主题':'切换暗色主题'" @click="changeTheme">{{theme==='dark'?'☼':'☾'}}</button><a class="console-link" href="#/dashboard">控制台 <span>→</span></a></div>
|
||||
</div></header>
|
||||
<main>
|
||||
<NetworkLanding v-if="page==='home'" :plans="plans"/>
|
||||
<template v-else>
|
||||
<div class="portal-top"><div class="content-width"><h1>{{title}}</h1><p>{{page==='shop'?'比较接入规格,选择适合的使用规模。':page==='nodes'?'节点、协议与接入配置。':page==='profile'?'管理账户信息与登录安全。':'服务、资源与账户的统一管理入口。'}}</p></div></div>
|
||||
<div class="portal-layout content-width">
|
||||
<aside class="portal-nav" aria-label="账户导航"><a v-for="item in menu" :key="item[0]" :href="'#/'+item[0]" :class="{active:page===item[0]}">{{item[1]}}<span>→</span></a></aside>
|
||||
<div class="portal-content">
|
||||
<template v-if="page==='dashboard'">
|
||||
<div class="metrics-grid"><section><span>剩余流量</span><strong>132.6 <small>GB</small></strong><p>本期总额 200 GB</p></section><section><span>套餐到期</span><strong class="date-value">2026.11.14</strong><p>标准接入 · 月付</p></section><section><span>账户余额</span><strong><small>¥</small> 24.00</strong><a href="#/orders">查看账单 →</a></section></div>
|
||||
<section class="panel"><header><h2>接入服务</h2><a href="#/shop">管理方案 →</a></header><div class="service-detail"><div><span class="service-badge">标准接入</span><h3>网络接入服务</h3><p>200 GB / 月 · 300 Mbps · 3 台设备</p></div><button class="button primary" @click="inform()">复制订阅配置</button></div><div class="usage-detail"><div><span>本期已用 67.4 GB</span><b>34%</b></div><div class="usage-track" role="img" aria-label="演示流量用量 34%"><span></span></div></div></section>
|
||||
<section class="panel"><header><h2>常用操作</h2></header><div class="action-grid"><a href="#/nodes"><b>网络资源</b><span>选择节点与查看协议 →</span></a><a href="#/docs"><b>接入指南</b><span>客户端与配置步骤 →</span></a><a href="#/tickets"><b>技术工单</b><span>提交问题与跟进处理 →</span></a></div></section>
|
||||
</template>
|
||||
<template v-else-if="page==='shop'">
|
||||
<div class="plan-toolbar"><h2>流量接入方案</h2><div class="period-control" aria-label="计费周期"><button :class="{active:period==='month'}" @click="period='month'" :aria-pressed="period==='month'">月付</button><button :class="{active:period==='year'}" @click="period='year'" :aria-pressed="period==='year'">年付</button></div></div>
|
||||
<div class="portal-plan-grid"><article v-for="plan in plans" :key="plan.id" :class="{selected:selected===plan.id}"><h2>{{plan.title}}</h2><div class="price"><span>¥</span><strong>{{plan.price*(period==='year'?12:1)}}</strong><small>/ {{period==='year'?'年':'月'}}</small></div><dl><div><dt>每月流量</dt><dd>{{plan.quota}} GB</dd></div><div><dt>速率规格</dt><dd>{{plan.speed}} Mbps</dd></div><div><dt>设备额度</dt><dd>{{plan.devices}} 台</dd></div></dl><button class="button" :class="selected===plan.id?'primary':'secondary'" @click="selected=plan.id;inform('已选择方案(演示),未创建订单。')">{{selected===plan.id?'已选择此方案':'选择方案'}}</button></article></div>
|
||||
<section class="panel configuration-note"><h3>选择方案前</h3><p>确认月流量、计费周期和设备额度。具体节点协议与倍率可在网络资源中查看。</p><a class="text-link" href="#/nodes">查看网络资源 →</a></section>
|
||||
</template>
|
||||
<template v-else-if="page==='nodes'">
|
||||
<section class="panel"><header><h2>订阅配置</h2></header><div class="service-detail"><div><h3>导入配置,连接网络。</h3><p>将订阅配置导入客户端后选择接入节点。</p></div><button class="button primary" @click="inform()">复制订阅配置</button></div></section>
|
||||
<section class="panel"><header><h2>网络资源</h2><span class="resource-count">3 个节点</span></header><div class="resource-table"><div class="resource-row table-heading"><span>地区</span><span>节点</span><span>协议</span><span>倍率</span></div><div class="resource-row" v-for="node in nodes" :key="node[1]"><b>{{node[0]}}</b><span>{{node[1]}}</span><span class="protocol">{{node[2]}}</span><span>{{node[3]}}</span></div></div></section>
|
||||
</template>
|
||||
<template v-else-if="page==='orders'">
|
||||
<section class="panel"><header><h2>订单记录</h2></header><div class="billing-row table-heading"><span>方案 / 订单</span><span>金额</span><span>日期</span><span>详情</span></div><div class="billing-row" v-for="(plan,index) in plans.slice(0,2)" :key="plan.id"><div><b>{{plan.title}}</b><small>HN-SAMPLE-000{{index+1}}</small></div><b>¥ {{plan.price.toFixed(2)}}</b><span>2026.10.14</span><button class="text-link" @click="inform()">查看 →</button></div></section>
|
||||
</template>
|
||||
<template v-else-if="page==='profile'">
|
||||
<section class="panel"><header><h2>账户信息</h2></header><form class="account-form" @submit.prevent="saved=true;inform('已保存(演示),不会提交数据。')"><div class="form-grid"><label>显示名称<input value="nerd_0001"/></label><label>邮箱地址<input type="email" value="[email protected]"/></label></div><div class="check-row"><label><input type="checkbox" checked/>套餐到期提醒</label><label><input type="checkbox" checked/>流量不足提醒</label></div><button class="button primary">{{saved?'已保存':'保存设置'}}</button></form></section>
|
||||
<section class="panel"><header><h2>登录安全</h2></header><div class="service-detail"><div><h3>密码与登录设备</h3><p>管理账户凭据和设备访问。</p></div><button class="button secondary" @click="inform()">安全设置</button></div></section>
|
||||
</template>
|
||||
<template v-else-if="page==='docs'">
|
||||
<section class="panel guide-panel"><header><h2>客户端接入指南</h2></header><ol><li><h3>选择接入方案</h3><p>确认月流量、使用周期与设备需求。</p></li><li><h3>导入订阅配置</h3><p>在客户端订阅管理中添加配置,更新节点列表。</p></li><li><h3>选择节点连接</h3><p>核对地区与协议后发起连接;遇到问题可提交技术工单。</p></li></ol><a class="text-link" href="#/tickets">联系技术支持 →</a></section>
|
||||
</template>
|
||||
<template v-else-if="page==='tickets'">
|
||||
<section class="panel"><header><h2>提交技术工单</h2></header><form class="ticket-form" @submit.prevent="inform('已展示提交效果,未发送工单。')"><label>问题标题<input placeholder="概述需要协助的问题" required/></label><label>详细描述<textarea v-model="question" rows="6" placeholder="客户端、错误提示、发生时间及已尝试的操作" required/></label><button class="button primary">提交工单</button></form></section>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</main>
|
||||
<footer class="site-footer"><div class="content-width"><div class="footer-brand"><strong>{{brand.domain}}</strong><span>{{brand.description}}</span></div><div class="footer-links"><a href="#/nodes">网络服务</a><a href="#/docs">服务文档</a><a href="#/tickets">技术支持</a></div><span class="copyright">© 2026 {{brand.copyrightName}}</span></div></footer>
|
||||
<div class="toast" v-if="notice" role="status"><span>{{notice}}</span><button aria-label="关闭提示" @click="notice=''">×</button></div>
|
||||
</template>
|
||||
@@ -0,0 +1,27 @@
|
||||
<script setup>
|
||||
defineProps({plans:{type:Array,required:true}});
|
||||
const coverage=[['亚太','东京 · 香港 · 新加坡'],['美洲','洛杉矶 · 西雅图'],['欧洲','法兰克福 · 伦敦']];
|
||||
</script>
|
||||
<template>
|
||||
<section class="dc-hero">
|
||||
<div class="content-width dc-hero-content">
|
||||
<h1>机房网络。<br/>连接业务的底座。</h1>
|
||||
<p>线路接入、流量管理、技术支持。<br/>从选择方案到日常管理,在一个平台完成。</p>
|
||||
<div class="hero-actions"><a class="button primary" href="#/shop">查看接入方案 <span>→</span></a><a class="button hero-secondary" href="#/dashboard">进入控制台</a></div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="service-overview content-width" aria-label="服务入口">
|
||||
<a href="#/nodes"><span class="service-icon">↗</span><div><h2>网络接入</h2><p>地区、节点与连接协议</p></div><span class="service-arrow">→</span></a>
|
||||
<a href="#/shop"><span class="service-icon">▤</span><div><h2>套餐与规格</h2><p>流量、周期与设备额度</p></div><span class="service-arrow">→</span></a>
|
||||
<a href="#/tickets"><span class="service-icon">+</span><div><h2>技术服务</h2><p>接入指南与工单支持</p></div><span class="service-arrow">→</span></a>
|
||||
</section>
|
||||
<section class="dc-section content-width">
|
||||
<header class="section-heading"><div><h2>连接网络,管理每一项资源。</h2><p>接入信息集中呈现,日常操作清晰可控。</p></div><a href="#/nodes">查看网络资源 →</a></header>
|
||||
<div class="coverage-layout"><div class="coverage-intro"><h3>跨区域网络接入</h3><p>按地区选择节点,查看协议与计费倍率,把连接配置带入你的客户端。</p><a class="text-link" href="#/docs">阅读接入指南 →</a></div><div class="coverage-list"><a v-for="region in coverage" :key="region[0]" href="#/nodes"><h3>{{region[0]}}</h3><p>{{region[1]}}</p><span>→</span></a></div></div>
|
||||
</section>
|
||||
<section class="dc-section dc-plan-section"><div class="content-width">
|
||||
<header class="section-heading"><div><h2>按需求选择接入方案。</h2><p>统一规格,直接比较。适配不同规模的网络使用。</p></div><a href="#/shop">查看所有方案 →</a></header>
|
||||
<div class="dc-plan-grid"><article v-for="plan in plans" :key="plan.id" :class="{featured:plan.id==='STANDARD'}"><h3>{{plan.title}}</h3><div class="price"><span>¥</span><strong>{{plan.price}}</strong><small>/ 月</small></div><dl><div><dt>月流量</dt><dd>{{plan.quota}} GB</dd></div><div><dt>速率规格</dt><dd>{{plan.speed}} Mbps</dd></div><div><dt>设备数量</dt><dd>{{plan.devices}} 台</dd></div></dl><a class="button" :class="plan.id==='STANDARD'?'primary':'secondary'" href="#/shop">查看方案 →</a></article></div>
|
||||
</div></section>
|
||||
<section class="dc-section content-width operational-section"><div><h2>服务交付之后,<br/>管理同样重要。</h2><p>订阅配置、流量使用、订单账单与技术工单,<br/>在统一控制台里完成。</p><a class="button primary" href="#/dashboard">打开控制台 →</a></div><div class="operations-panel"><a href="#/dashboard"><b>服务与流量</b><span>查看套餐周期与剩余额度</span><i>→</i></a><a href="#/orders"><b>订单与账单</b><span>核对购买记录和订单详情</span><i>→</i></a><a href="#/tickets"><b>技术支持</b><span>提交问题与跟进处理记录</span><i>→</i></a></div></section>
|
||||
</template>
|
||||
@@ -0,0 +1 @@
|
||||
export default {name:'hardnerd',domain:'hardnerd.net',domainSuffix:'.net',symbol:'HN',description:'机房网络运营商',copyrightName:'Hardnerd'};
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
import {createApp} from 'vue';
|
||||
import App from './App.vue';
|
||||
import './operator.css';
|
||||
createApp(App).mount('#app');
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
:root{color-scheme:dark;--bg:#0b1420;--surface:#111f2e;--panel:#152536;--raised:#1c3042;--ink:#e9eef4;--muted:#9bacbe;--line:#293d50;--accent:#f29759;--primary:#ef914e;--primary-ink:#121c26;--input:#101c2a;--soft:#15283b;--shadow:0 12px 40px #02071133;font-family:'Helvetica Neue','PingFang SC','Microsoft YaHei',Arial,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
|
||||
html[data-theme=light]{color-scheme:light;--bg:#f4f7fa;--surface:#fff;--panel:#fff;--raised:#edf3f8;--ink:#142a40;--muted:#617489;--line:#dce5ec;--accent:#bd4e19;--primary:#c1531c;--primary-ink:#fff;--input:#f8fafc;--soft:#edf3f8;--shadow:0 12px 40px #163a6110}
|
||||
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-width:320px}h1,h2,h3,p{margin:0}a{color:inherit;text-decoration:none}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer;background:none;border:0}button,a{-webkit-tap-highlight-color:transparent}a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:4px}::selection{background:var(--primary);color:var(--primary-ink)}.content-width{width:calc(100% - 96px);max-width:1320px;margin-inline:auto}.preview-notice{background:var(--bg);color:var(--muted);font-size:11px;padding-block:9px;border-bottom:1px solid var(--line)}
|
||||
.site-header{background:var(--surface);border-bottom:1px solid var(--line)}.header-inner{display:flex;align-items:center;gap:38px;min-height:98px}.brand{display:flex;align-items:center;gap:13px;flex-shrink:0}.brand-symbol{display:flex;align-items:center;justify-content:center;width:49px;height:49px;border-radius:4px;background:var(--primary);color:var(--primary-ink);font-family:Arial,sans-serif;font-size:21px;letter-spacing:-1px;font-weight:900;clip-path:polygon(0 0,85% 0,100% 15%,100% 100%,0 100%)}.brand-text{display:flex;flex-direction:column;gap:7px}.brand-text strong{font-size:28px;letter-spacing:-1px;font-weight:800;line-height:1}.brand-text strong>span{font-size:15px;font-weight:600;letter-spacing:-.2px}.brand-text small{font-size:11px;letter-spacing:1px;color:var(--muted)}.public-nav{margin-left:auto;display:flex;align-items:center;gap:33px}.public-nav>a{font-size:14px;font-weight:500;color:var(--muted);padding-block:16px;white-space:nowrap;border-bottom:2px solid transparent}.public-nav>a:hover,.public-nav>a.active{color:var(--ink);border-bottom-color:var(--accent)}.header-tools{display:flex;align-items:center;gap:22px}.theme-button{width:28px;height:32px;font-size:23px;line-height:1;color:var(--muted);padding:0}.console-link{display:flex;align-items:center;gap:24px;white-space:nowrap;background:var(--soft);border:1px solid var(--line);padding:13px 18px;border-radius:5px;font-size:13px;font-weight:600}.mobile-menu,.mobile-console{display:none}
|
||||
.button{display:inline-flex;align-items:center;justify-content:center;gap:25px;border:1px solid transparent;border-radius:5px;min-height:49px;padding:14px 23px;font-size:14px;font-weight:600;line-height:1.4;transition:filter .15s,background .15s}.button:hover{filter:brightness(1.1)}.button.primary{background:var(--primary);color:var(--primary-ink);border-color:var(--primary)}.button.secondary{background:var(--soft);border-color:var(--line);color:var(--ink)}.text-link{color:var(--accent);font-size:13px;line-height:1.7;padding:0}
|
||||
.dc-hero{position:relative;background:#091422;background-image:linear-gradient(90deg,#061321ec 0%,#061321c2 35%,#06132130 76%,#0613210a 100%),linear-gradient(0deg,#071420dd 0%,transparent 45%),url('/datacenter-hero-v1.png');background-size:cover;background-position:center 52%;color:#fff;min-height:620px;display:flex;align-items:center}.dc-hero-content{padding-block:80px 100px}.dc-hero h1{font-size:clamp(44px,4.5vw,68px);font-weight:650;line-height:1.32;letter-spacing:-1.8px;max-width:760px}.dc-hero p{font-size:17px;line-height:1.9;color:#c4d1df;margin-block:28px 33px}.hero-actions{display:flex;align-items:center;gap:17px;flex-wrap:wrap}.hero-actions .primary{background:#f29656;border-color:#f29656;color:#101d29}.hero-secondary{background:#ffffff0d;border-color:#ffffff61;color:#fff}.hero-secondary:hover{background:#ffffff16}
|
||||
.service-overview{position:relative;margin-top:-36px;display:grid;grid-template-columns:repeat(3,1fr);background:var(--surface);border:1px solid var(--line);border-radius:7px;box-shadow:var(--shadow);z-index:1}.service-overview>a{display:flex;align-items:center;gap:21px;padding:33px 28px;border-right:1px solid var(--line)}.service-overview>a:last-child{border:0}.service-overview>a:hover{background:var(--raised)}.service-icon{display:flex;align-items:center;justify-content:center;width:43px;height:43px;border:1px solid var(--line);color:var(--accent);font-size:25px;border-radius:6px;flex-shrink:0}.service-overview h2{font-size:21px;font-weight:600;margin-bottom:10px}.service-overview p{font-size:12px;color:var(--muted);line-height:1.5}.service-arrow{margin-left:auto;font-size:20px;color:var(--muted)}
|
||||
.dc-section{padding-block:90px}.section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:35px;margin-bottom:38px}.section-heading h2{font-size:34px;line-height:1.45;letter-spacing:-.7px;font-weight:600}.section-heading p{font-size:14px;color:var(--muted);line-height:1.9;margin-top:16px}.section-heading>a{font-size:13px;color:var(--accent);white-space:nowrap;padding-bottom:5px}.coverage-layout{display:grid;grid-template-columns:1fr 1.4fr;border:1px solid var(--line);border-radius:7px;overflow:hidden;background:var(--surface)}.coverage-intro{padding:40px 37px;background:linear-gradient(135deg,var(--panel),var(--surface));border-right:1px solid var(--line)}.coverage-intro h3{font-size:26px;font-weight:600;margin-bottom:19px}.coverage-intro p{font-size:14px;color:var(--muted);line-height:2;max-width:355px;margin-bottom:26px}.coverage-list{display:grid;grid-template-columns:1fr}.coverage-list>a{display:grid;grid-template-columns:100px 1fr 20px;align-items:center;gap:25px;padding:27px 35px;border-bottom:1px solid var(--line)}.coverage-list>a:last-child{border:0}.coverage-list>a:hover{background:var(--raised)}.coverage-list h3{font-size:20px;font-weight:600}.coverage-list p{font-size:13px;color:var(--muted);line-height:1.8}.coverage-list span{color:var(--accent);font-size:19px}
|
||||
.dc-plan-section{background:var(--surface);border-block:1px solid var(--line)}.dc-plan-grid,.portal-plan-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}.dc-plan-grid>article,.portal-plan-grid>article{padding:35px 31px;background:var(--panel);border:1px solid var(--line);border-radius:7px;position:relative}.dc-plan-grid>article.featured,.portal-plan-grid>article.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.dc-plan-grid h3,.portal-plan-grid h2{font-size:23px;font-weight:600}.price{display:flex;align-items:baseline;gap:8px;margin-block:30px;color:var(--ink)}.price>span{font-size:20px}.price strong{font-family:Arial,sans-serif;font-size:58px;line-height:1;letter-spacing:-2px;font-weight:600}.price small{font-size:12px;color:var(--muted);margin-left:4px}.dc-plan-grid dl,.portal-plan-grid dl{margin:0 0 28px}.dc-plan-grid dl>div,.portal-plan-grid dl>div{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 0;border-top:1px solid var(--line);font-size:13px}.dc-plan-grid dt,.portal-plan-grid dt{color:var(--muted)}.dc-plan-grid dd,.portal-plan-grid dd{margin:0;font-weight:500}.dc-plan-grid .button,.portal-plan-grid .button{width:100%}
|
||||
.operational-section{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:100px}.operational-section h2{font-size:34px;line-height:1.5;font-weight:600;letter-spacing:-.5px}.operational-section p{font-size:14px;line-height:2;color:var(--muted);margin-block:22px 28px}.operations-panel{border:1px solid var(--line);background:var(--surface);border-radius:7px;overflow:hidden}.operations-panel>a{display:grid;grid-template-columns:1fr 20px;gap:14px 25px;padding:27px 30px;border-bottom:1px solid var(--line)}.operations-panel>a:last-child{border:0}.operations-panel>a:hover{background:var(--raised)}.operations-panel b{font-size:19px;font-weight:600}.operations-panel span{font-size:13px;color:var(--muted);grid-column:1}.operations-panel i{grid-column:2;grid-row:1 / span 2;align-self:center;font-style:normal;color:var(--accent);font-size:20px}
|
||||
.site-footer{background:var(--surface);border-top:1px solid var(--line);padding-block:42px}.site-footer>.content-width{display:flex;align-items:center;justify-content:space-between;gap:35px}.footer-brand{display:flex;flex-direction:column;gap:12px}.footer-brand strong{font-size:23px;font-weight:700;letter-spacing:-.5px}.footer-brand span{font-size:12px;color:var(--muted)}.footer-links{display:flex;align-items:center;gap:30px;font-size:13px;color:var(--muted)}.copyright{font-size:11px;color:var(--muted)}
|
||||
|
||||
/* Unified service portal. */
|
||||
.portal-top{background:var(--surface);border-bottom:1px solid var(--line);padding-block:38px 32px}.portal-top h1{font-size:32px;line-height:1.4;font-weight:600;letter-spacing:-.5px}.portal-top p{font-size:13px;color:var(--muted);line-height:1.8;margin-top:12px}.portal-layout{display:grid;grid-template-columns:198px minmax(0,1fr);gap:32px;padding-block:35px 70px;min-height:620px;align-items:start}.portal-nav{border:1px solid var(--line);background:var(--surface);border-radius:6px;overflow:hidden}.portal-nav>a{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:19px 22px;font-size:14px;color:var(--muted);border-left:3px solid transparent}.portal-nav>a span{font-size:13px;opacity:0}.portal-nav>a.active{color:var(--accent);border-left-color:var(--accent);background:var(--soft);font-weight:600}.portal-nav>a.active span{opacity:1}.portal-nav>a:hover{background:var(--raised)}.portal-content{min-width:0}.panel{border:1px solid var(--line);background:var(--panel);border-radius:7px;overflow:hidden;margin-bottom:26px}.panel:last-child{margin-bottom:0}.panel>header{display:flex;align-items:center;justify-content:space-between;gap:25px;padding:22px 27px;border-bottom:1px solid var(--line)}.panel>header h2{font-size:18px;font-weight:600}.panel>header a{font-size:12px;color:var(--accent)}.resource-count{font-size:12px;color:var(--muted)}.metrics-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:26px}.metrics-grid>section{padding:25px;border:1px solid var(--line);border-radius:7px;background:var(--panel)}.metrics-grid>section>span{font-size:12px;color:var(--muted)}.metrics-grid strong{display:block;font-family:Arial,sans-serif;font-size:34px;font-weight:600;line-height:1.3;letter-spacing:-.8px;margin-block:18px 13px;white-space:nowrap}.metrics-grid strong small{font-size:15px;letter-spacing:0;font-weight:400;color:var(--muted)}.metrics-grid .date-value{font-size:24px;letter-spacing:-.7px;margin-block:25px 17px}.metrics-grid p,.metrics-grid a{font-size:11px;color:var(--muted)}.metrics-grid a{color:var(--accent)}.service-detail{display:flex;align-items:center;justify-content:space-between;gap:30px;padding:30px 27px}.service-detail h3{font-size:22px;line-height:1.5;font-weight:600}.service-detail p{font-size:13px;line-height:1.8;color:var(--muted);margin-top:12px}.service-detail .button{font-size:13px;white-space:nowrap}.service-badge{font-size:11px;display:inline-block;background:var(--soft);border:1px solid var(--line);border-radius:4px;padding:6px 9px;color:var(--accent);margin-bottom:14px}.usage-detail{padding:0 27px 28px}.usage-detail>div:first-child{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--muted);margin-bottom:12px}.usage-detail b{font-weight:500}.usage-track{height:7px;border-radius:4px;background:var(--raised);overflow:hidden}.usage-track span{display:block;width:34%;height:100%;background:var(--accent)}.action-grid{display:grid;grid-template-columns:repeat(3,1fr)}.action-grid>a{padding:28px 22px;border-right:1px solid var(--line)}.action-grid>a:last-child{border:0}.action-grid b{font-size:15px;font-weight:600;display:block;margin-bottom:15px}.action-grid span{font-size:11px;color:var(--muted);line-height:1.8}.action-grid a:hover{background:var(--raised)}
|
||||
.plan-toolbar{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-bottom:26px}.plan-toolbar h2{font-size:19px;font-weight:600}.period-control{display:flex;background:var(--surface);border:1px solid var(--line);border-radius:5px;padding:4px;gap:3px}.period-control button{padding:9px 20px;font-size:12px;border-radius:3px;color:var(--muted)}.period-control button.active{background:var(--primary);color:var(--primary-ink);font-weight:600}.portal-plan-grid{gap:18px;margin-bottom:28px}.portal-plan-grid>article{padding:29px 23px}.portal-plan-grid h2{font-size:21px}.portal-plan-grid .price strong{font-size:49px}.portal-plan-grid .price>span{font-size:16px}.portal-plan-grid .price small{font-size:11px}.portal-plan-grid dl>div{font-size:12px;gap:15px}.portal-plan-grid .button{font-size:12px;padding-inline:12px}.configuration-note{padding:27px}.configuration-note h3{font-size:16px;font-weight:600}.configuration-note p{font-size:13px;color:var(--muted);line-height:1.9;margin-block:13px}.resource-row{display:grid;grid-template-columns:1.5fr 1fr 1fr .5fr;align-items:center;gap:25px;padding:24px 27px;border-bottom:1px solid var(--line);font-size:13px}.resource-row:last-child{border:0}.resource-row b{font-weight:500}.resource-row>span:nth-child(2){font-size:12px;color:var(--muted)}.resource-row .protocol{font-size:12px;color:var(--ink)}.table-heading{background:var(--soft);font-size:11px!important;color:var(--muted);padding-block:14px!important}.billing-row{display:grid;grid-template-columns:1.8fr .8fr 1fr .5fr;align-items:center;gap:25px;padding:24px 27px;border-bottom:1px solid var(--line);font-size:12px}.billing-row:last-child{border:0}.billing-row b{font-size:13px;font-weight:500}.billing-row small{display:block;font-size:10px;color:var(--muted);margin-top:9px}.account-form,.ticket-form{padding:30px 27px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:26px}label{display:block;font-size:13px;line-height:1.7}input,textarea{display:block;width:100%;min-width:0;padding:13px 14px;border:1px solid var(--line);background:var(--input);border-radius:5px;margin-top:11px;font-size:14px}input::placeholder,textarea::placeholder{color:var(--muted)}textarea{resize:vertical;line-height:1.9}.check-row{display:flex;align-items:center;gap:35px;margin-block:29px}.check-row label{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}.check-row input{width:14px;height:14px;padding:0;margin:0;accent-color:var(--primary)}.ticket-form label{margin-bottom:25px}.guide-panel ol{margin:0;padding:30px 35px 5px 54px}.guide-panel li{padding-left:12px;margin-bottom:28px;color:var(--accent)}.guide-panel li h3{color:var(--ink);font-size:17px;font-weight:600}.guide-panel li p{color:var(--muted);font-size:13px;line-height:2;margin-top:11px}.guide-panel>.text-link{display:inline-block;margin:0 27px 30px}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 40px);background:var(--surface);border:1px solid var(--accent);border-radius:6px;box-shadow:var(--shadow);padding:16px 20px;display:flex;align-items:center;gap:25px;font-size:13px;line-height:1.7;z-index:10}.toast button{font-size:23px;color:var(--muted);padding:0}
|
||||
@media(max-width:1180px){.content-width{width:calc(100% - 64px)}.header-inner{gap:26px}.public-nav{gap:24px}.brand-text strong{font-size:25px}.brand-symbol{width:43px;height:43px;font-size:19px}.header-tools{gap:16px}.console-link{padding-inline:14px;gap:18px}.dc-hero{min-height:590px}.dc-hero h1{font-size:5.3vw}.service-overview>a{padding:28px 22px;gap:16px}.service-overview h2{font-size:19px}.service-overview p{font-size:11px}.service-icon{width:36px;height:36px;font-size:23px}.service-arrow{font-size:16px}.operational-section{gap:55px}.portal-layout{grid-template-columns:175px minmax(0,1fr);gap:25px}.metrics-grid{gap:17px}.metrics-grid>section{padding:23px 18px}.metrics-grid strong{font-size:29px}.metrics-grid .date-value{font-size:22px}.portal-plan-grid{gap:15px}.portal-plan-grid>article{padding:28px 19px}.portal-plan-grid .price strong{font-size:44px}.portal-plan-grid .price small{margin-left:0}}
|
||||
@media(max-width:960px){.header-inner{flex-wrap:wrap;padding-block:21px 15px;gap:19px}.public-nav{order:3;width:100%;margin:0;gap:34px}.public-nav>a{padding-block:9px;font-size:13px}.header-tools{margin-left:auto}.dc-hero{min-height:550px;background-position:60% center}.dc-hero-content{padding-block:68px 88px}.dc-hero h1{font-size:5.6vw;max-width:650px}.dc-hero p{font-size:15px}.service-overview>a{padding:26px 20px;gap:14px}.service-overview h2{font-size:18px}.service-arrow{display:none}.service-icon{width:31px;height:35px;font-size:21px}.dc-section{padding-block:70px}.section-heading h2{font-size:29px}.section-heading p{font-size:13px}.coverage-layout{grid-template-columns:1fr 1.3fr}.coverage-intro{padding:31px 27px}.coverage-intro h3{font-size:23px}.coverage-list>a{grid-template-columns:65px 1fr 15px;gap:18px;padding:26px}.coverage-list h3{font-size:19px}.coverage-list p{font-size:12px}.dc-plan-grid{gap:18px}.dc-plan-grid>article{padding:29px 23px}.dc-plan-grid h3{font-size:21px}.price strong{font-size:50px}.dc-plan-grid dl>div{font-size:12px;gap:13px}.operational-section{gap:35px}.operational-section h2{font-size:29px}.operations-panel>a{padding:25px}.operations-panel span{font-size:12px}.footer-links{gap:22px;font-size:12px}.copyright{font-size:10px}.portal-layout{grid-template-columns:150px minmax(0,1fr);gap:22px}.portal-nav>a{font-size:13px;padding:18px 17px}.metrics-grid{grid-template-columns:1fr;gap:15px}.metrics-grid>section{display:grid;grid-template-columns:1fr 1fr;gap:12px 20px;padding:22px}.metrics-grid>section>span{align-self:center}.metrics-grid strong{grid-column:2;grid-row:1 / span 2;align-self:center;justify-self:end;margin:0;font-size:34px}.metrics-grid .date-value{margin:0;font-size:26px}.service-detail{flex-wrap:wrap;padding:27px}.action-grid{grid-template-columns:1fr}.action-grid>a{border-right:0;border-bottom:1px solid var(--line);padding:24px 27px}.action-grid b{margin-bottom:11px}.portal-plan-grid{grid-template-columns:1fr}.portal-plan-grid>article{display:grid;grid-template-columns:1fr 1fr;gap:0 30px;padding:29px}.portal-plan-grid h2{grid-column:1}.portal-plan-grid .price{grid-column:1;margin-block:25px}.portal-plan-grid .price strong{font-size:48px}.portal-plan-grid dl{grid-column:2;grid-row:1 / span 2;align-self:center;margin:0}.portal-plan-grid .button{grid-column:1 / span 2;margin-top:20px}.form-grid{grid-template-columns:1fr}.check-row{flex-direction:column;align-items:flex-start;gap:18px}.resource-row{grid-template-columns:1.2fr 1fr;gap:15px;padding:23px 25px}.resource-row.table-heading{display:none}.billing-row{grid-template-columns:1.5fr 1fr;gap:20px}.billing-row.table-heading{display:none}.resource-row>span:last-child{font-size:12px;color:var(--muted)}}
|
||||
@media(max-width:680px){.content-width{width:calc(100% - 40px)}.preview-notice{font-size:9px;padding-block:8px}.header-inner{padding-block:20px;min-height:84px;gap:15px}.brand{gap:10px}.brand-symbol{width:39px;height:39px;font-size:18px}.brand-text strong{font-size:26px}.brand-text small{font-size:10px;letter-spacing:.5px}.brand-text strong>span{font-size:13px}.header-tools{margin-left:0}.theme-button{font-size:21px;width:23px}.console-link{display:none}.mobile-menu{display:block;order:2;margin-left:auto;font-size:12px;color:var(--muted);padding:0;white-space:nowrap}.header-tools{order:1;margin-left:auto}.public-nav{display:none;order:3;gap:15px;padding-top:5px}.public-nav.expanded{display:grid;grid-template-columns:repeat(4,1fr)}.public-nav>a{font-size:12px;padding:8px 0}.public-nav .mobile-console{display:block;grid-column:1 / span 4;border-top:1px solid var(--line);padding-top:15px;color:var(--accent)}.dc-hero{min-height:535px;background-position:65% center;background-image:linear-gradient(90deg,#061321e3,#0613218f),linear-gradient(0deg,#061321c9,transparent),url('/datacenter-hero-v1.png')}.dc-hero-content{padding-block:55px 80px}.dc-hero h1{font-size:clamp(36px,9vw,55px);letter-spacing:-1px;line-height:1.4;max-width:100%}.dc-hero p{font-size:14px;line-height:1.9;margin-block:23px 28px}.hero-actions{gap:13px}.hero-actions .button{font-size:13px;padding:14px 17px;gap:18px}.service-overview{grid-template-columns:1fr;margin-top:-28px}.service-overview>a{padding:24px;border-right:0;border-bottom:1px solid var(--line);gap:19px}.service-overview h2{font-size:19px;margin-bottom:8px}.service-overview p{font-size:12px}.service-icon{width:38px;height:38px;font-size:23px}.service-arrow{display:block;font-size:18px}.dc-section{padding-block:50px}.section-heading{display:block;margin-bottom:28px}.section-heading h2{font-size:27px;line-height:1.5;letter-spacing:-.5px}.section-heading p{font-size:13px;margin-top:13px}.section-heading>a{display:inline-block;margin-top:20px;padding:0;font-size:12px}.coverage-layout{grid-template-columns:1fr}.coverage-intro{padding:29px;border-right:0;border-bottom:1px solid var(--line)}.coverage-intro h3{font-size:23px}.coverage-intro p{font-size:13px;line-height:2;max-width:100%;margin-bottom:21px}.coverage-list>a{padding:23px 27px;grid-template-columns:63px 1fr 15px;gap:17px}.coverage-list h3{font-size:19px}.coverage-list p{font-size:12px}.dc-plan-grid{grid-template-columns:1fr;gap:22px}.dc-plan-grid>article{padding:31px}.dc-plan-grid h3{font-size:24px}.price strong{font-size:58px}.dc-plan-grid dl>div{font-size:14px}.operational-section{display:block}.operational-section h2{font-size:28px}.operational-section p{font-size:13px}.operations-panel{margin-top:32px}.operations-panel>a{padding:25px 27px}.operations-panel b{font-size:19px}.operations-panel span{font-size:13px}.site-footer{padding-block:33px}.site-footer>.content-width{flex-wrap:wrap;gap:30px}.footer-brand{width:100%}.footer-links{gap:25px;font-size:12px}.copyright{font-size:10px}.portal-top{padding-block:29px 25px}.portal-top h1{font-size:29px}.portal-top p{font-size:12px;margin-top:10px}.portal-layout{display:block;padding-block:24px 45px;min-height:0}.portal-nav{display:flex;overflow:auto;border:0;border-bottom:1px solid var(--line);border-radius:0;margin-bottom:25px;padding-bottom:13px;gap:24px;background:none}.portal-nav>a{padding:6px 0;white-space:nowrap;border:0!important;font-size:13px;color:var(--muted)}.portal-nav>a.active{background:none}.portal-nav>a span{display:none}.panel{margin-bottom:23px}.panel>header{padding:20px 23px;gap:18px}.panel>header h2{font-size:17px}.metrics-grid>section{padding:23px}.metrics-grid strong{font-size:33px}.metrics-grid .date-value{font-size:25px}.service-detail{padding:26px 23px;gap:25px}.service-detail h3{font-size:22px}.service-detail p{font-size:13px;line-height:1.9}.service-detail .button{font-size:13px}.usage-detail{padding:0 23px 27px}.action-grid>a{padding:25px 23px}.action-grid b{font-size:16px}.action-grid span{font-size:12px}.plan-toolbar{gap:20px;flex-wrap:wrap}.plan-toolbar h2{font-size:18px}.period-control button{padding:9px 18px;font-size:12px}.portal-plan-grid>article{display:block;padding:30px}.portal-plan-grid h2{font-size:24px}.portal-plan-grid .price strong{font-size:55px}.portal-plan-grid .price{margin-block:29px}.portal-plan-grid dl{margin-bottom:25px}.portal-plan-grid dl>div{font-size:14px}.portal-plan-grid .button{font-size:14px;margin:0}.configuration-note{padding:25px}.configuration-note p{font-size:13px}.resource-row{padding:24px;gap:17px;font-size:12px}.billing-row{padding:24px;gap:18px;font-size:12px}.account-form,.ticket-form{padding:26px 23px}.form-grid{gap:24px}label{font-size:13px}.check-row label{font-size:12px}.guide-panel ol{padding:28px 25px 0 40px}.guide-panel li{padding-left:9px}.guide-panel li h3{font-size:17px}.guide-panel li p{font-size:13px}.toast{width:calc(100vw - 40px);font-size:12px;padding:15px 18px;gap:18px}}
|
||||
@media(max-width:370px){.content-width{width:calc(100% - 32px)}.brand-text strong{font-size:23px}.brand-text small{font-size:9px}.brand-symbol{width:35px;height:35px;font-size:17px}.header-inner{gap:11px}.brand{gap:8px}.mobile-menu{font-size:11px}.theme-button{width:21px;font-size:19px}.dc-hero h1{font-size:32px;letter-spacing:-.8px}.dc-hero p{font-size:13px}.hero-actions .button{font-size:12px;padding-inline:15px}.public-nav.expanded{gap:12px}.public-nav>a{font-size:11px}.section-heading h2{font-size:25px}.coverage-list>a{padding-inline:22px;gap:13px}.coverage-list p{font-size:11px}.footer-links{gap:19px}}
|
||||
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.button{transition:none}}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "tpl-a",
|
||||
"version": "1.0.0",
|
||||
"design_status": "approved",
|
||||
"approved_on": "2026-10-14",
|
||||
"scope": "frontend design prototype",
|
||||
"site_binding": null,
|
||||
"demo_brand": "hardnerd.net",
|
||||
"default_color_mode": "dark",
|
||||
"color_modes": [
|
||||
"dark",
|
||||
"light"
|
||||
],
|
||||
"business_integration": false
|
||||
}
|
||||
Loaded 100 of 163 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user