github.com/sagernet/sing-box@v1.9.0-rc.20/docs/configuration/rule-set/index.md (about)

     1  # Rule Set
     2  
     3  !!! question "Since sing-box 1.8.0"
     4  
     5  ### Structure
     6  
     7  ```json
     8  {
     9    "type": "",
    10    "tag": "",
    11    "format": "",
    12    
    13    ... // Typed Fields
    14  }
    15  ```
    16  
    17  #### Local Structure
    18  
    19  ```json
    20  {
    21    "type": "local",
    22    
    23    ...
    24    
    25    "path": ""
    26  }
    27  ```
    28  
    29  #### Remote Structure
    30  
    31  !!! info ""
    32  
    33      Remote rule-set will be cached if `experimental.cache_file.enabled`.
    34  
    35  ```json
    36  {
    37    "type": "remote",
    38    
    39    ...,
    40    
    41    "url": "",
    42    "download_detour": "",
    43    "update_interval": ""
    44  }
    45  ```
    46  
    47  ### Fields
    48  
    49  #### type
    50  
    51  ==Required==
    52  
    53  Type of Rule Set, `local` or `remote`.
    54  
    55  #### tag
    56  
    57  ==Required==
    58  
    59  Tag of Rule Set.
    60  
    61  #### format
    62  
    63  ==Required==
    64  
    65  Format of Rule Set, `source` or `binary`.
    66  
    67  ### Local Fields
    68  
    69  #### path
    70  
    71  ==Required==
    72  
    73  File path of Rule Set.
    74  
    75  ### Remote Fields
    76  
    77  #### url
    78  
    79  ==Required==
    80  
    81  Download URL of Rule Set.
    82  
    83  #### download_detour
    84  
    85  Tag of the outbound to download rule-set.
    86  
    87  Default outbound will be used if empty.
    88  
    89  #### update_interval
    90  
    91  Update interval of Rule Set.
    92  
    93  `1d` will be used if empty.