mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-22 13:39:11 -04:00
Add WebUI Support for V2Ray (#3284)
* Add support for web based grpc * Avoid panic in observatory command: incorrect tag * Add WebCommander app for web based client * Add WebCommander app for web based client * Add urlline subscription container format support * avoid panic when serving user request * refine subscription info api * fix start consistency issue in web commander * fix webcommander import style * fix urlline parsing * fix crash in subscription commander * add webroot file serving at webcommmander * fix crash when observatory is not found * add autogenerated subscriptionmgr err
This commit is contained in:
committed by
GitHub
parent
4adda5806a
commit
69b09074f8
@@ -76,3 +76,21 @@ type materializedServer struct {
|
||||
|
||||
serverConfig *specs.SubscriptionServerConfig
|
||||
}
|
||||
|
||||
func (s *trackedSubscription) fillStatus(status *subscription.TrackedSubscriptionStatus) error {
|
||||
status.ImportSource = s.importSource
|
||||
if s.currentDocument == nil {
|
||||
return nil
|
||||
}
|
||||
status.DocumentMetadata = s.currentDocument.Metadata
|
||||
status.Servers = make(map[string]*subscription.SubscriptionServer)
|
||||
for _, v := range s.currentDocument.Server {
|
||||
status.Servers[v.Id] = &subscription.SubscriptionServer{
|
||||
ServerMetadata: v.Metadata,
|
||||
}
|
||||
if materializedInstance, ok := s.materialized[v.Id]; ok {
|
||||
status.Servers[v.Id].Tag = materializedInstance.tagPostfix
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user