mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-10 14:29:54 +00:00
chore: trivial fixes
This commit is contained in:
parent
b5c1980202
commit
b07b12a651
@ -102,8 +102,8 @@ type GeoLoader interface {
|
|||||||
// Compile compiles TextRules into a CompiledRuleSet.
|
// Compile compiles TextRules into a CompiledRuleSet.
|
||||||
// Names in the outbounds map MUST be in all lower case.
|
// Names in the outbounds map MUST be in all lower case.
|
||||||
// We want on-demand loading of GeoIP/GeoSite databases, so instead of passing the
|
// We want on-demand loading of GeoIP/GeoSite databases, so instead of passing the
|
||||||
// databases directly, we use a GeoLoader interface to load them. This way, they are
|
// databases directly, we use a GeoLoader interface to load them only when needed
|
||||||
// only loaded when there are at least one rule that uses them.
|
// by at least one rule.
|
||||||
func Compile[O Outbound](rules []TextRule, outbounds map[string]O,
|
func Compile[O Outbound](rules []TextRule, outbounds map[string]O,
|
||||||
cacheSize int, geoLoader GeoLoader,
|
cacheSize int, geoLoader GeoLoader,
|
||||||
) (CompiledRuleSet[O], error) {
|
) (CompiledRuleSet[O], error) {
|
||||||
|
@ -269,7 +269,6 @@ func TestCompile(t *testing.T) {
|
|||||||
// Test Invalid Port Range Rule
|
// Test Invalid Port Range Rule
|
||||||
eb1 := 1
|
eb1 := 1
|
||||||
invalidRules := []TextRule{
|
invalidRules := []TextRule{
|
||||||
|
|
||||||
{
|
{
|
||||||
Outbound: "eb1",
|
Outbound: "eb1",
|
||||||
Address: "1.1.2.0/24",
|
Address: "1.1.2.0/24",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user