mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-14 00:51:12 +03:00
Update Amnezia H1-H4 format
This commit is contained in:
@@ -71,6 +71,13 @@ func (c *Range) UnmarshalJSON(content []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Range) String() string {
|
||||
if c.From == c.To {
|
||||
return strconv.FormatInt(int64(c.From), 10)
|
||||
}
|
||||
return fmt.Sprintf("%d-%d", c.From, c.To)
|
||||
}
|
||||
|
||||
func (c Range) Rand() int32 {
|
||||
return int32(crypto.RandBetween(int64(c.From), int64(c.To)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user