diff options
| author | Sanaei <ho3ein.sanaei@gmail.com> | 2025-06-11 16:43:46 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-11 16:43:46 +0300 |
| commit | 4531574de39887e149fe702cd76e2b2d01738632 (patch) | |
| tree | a2e5623b9eb36cc998d869932599c74ca9335a28 | |
| parent | d9922d93af64c30a40d855f0eed142f49e8b583a (diff) | |
| parent | d1e07954c51229c2d74756685c33cd70c67fa2ef (diff) | |
Merge pull request #3087 from rammiah/main
feat: support metrics config
| -rw-r--r-- | web/service/config.json | 8 | ||||
| -rw-r--r-- | xray/config.go | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/web/service/config.json b/web/service/config.json index e7425ac0..764d2b2e 100644 --- a/web/service/config.json +++ b/web/service/config.json @@ -81,5 +81,9 @@ } ] }, - "stats": {} -}
\ No newline at end of file + "stats": {}, + "metrics": { + "tag": "metrics_out", + "listen": "127.0.0.1:11111" + } +} diff --git a/xray/config.go b/xray/config.go index 67ff7d95..a246b845 100644 --- a/xray/config.go +++ b/xray/config.go @@ -20,6 +20,7 @@ type Config struct { FakeDNS json_util.RawMessage `json:"fakedns"` Observatory json_util.RawMessage `json:"observatory"` BurstObservatory json_util.RawMessage `json:"burstObservatory"` + Metrics json_util.RawMessage `json:"metrics"` } func (c *Config) Equals(other *Config) bool { @@ -61,5 +62,8 @@ func (c *Config) Equals(other *Config) bool { if !bytes.Equal(c.FakeDNS, other.FakeDNS) { return false } + if !bytes.Equal(c.Metrics, other.Metrics) { + return false + } return true } |
