Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] URLTest based backup group outbound selection #2130

Open
se1jaku opened this issue Sep 21, 2024 · 5 comments
Open

[Feature Request] URLTest based backup group outbound selection #2130

se1jaku opened this issue Sep 21, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@se1jaku
Copy link

se1jaku commented Sep 21, 2024

Hi!
Currently, the URLTest picks out an outbound by latency and tolerance from a certain group of outbounds.

I suggest a new typeof URLTest based outbound that selects the first available one from a list of outbounds.

Say it like the following structure.

{
  "type": "backup",
  "tag": "auto",
  // select the first available one from the list
  "outbounds": [
    "proxy-a",
    "proxy-b",
    "proxy-c"
  ],
  "url": "",
  "interval": "",
  "tolerance": 50, // takes no effect
  "idle_timeout": "",
  "interrupt_exist_connections": false
  // some extra fields
  //
  // switch_back_policy
  //   n(positive): switch back to the prior outbound only after it passes n times url test
  //   1: always select the first available outbound (a special case of n = 1)
  //   0: as long as the current outbound alive, keep on it
  "switch_back_policy": 0,
}

This will greatly improve the logic of outbound. Makes it more robust.
Similar implement could be found here: Fallback proxy groups

Thanks

@nekohasekai nekohasekai added the enhancement New feature or request label Sep 24, 2024
@HaradaKashiwa
Copy link

Wouldn't putting urltest in urltest outbound work?

@fouvromenth
Copy link

Wouldn't putting urltest in urltest outbound work?

Could you explain in more detail? I can't imagine the difference between using just one urltest and using two or more.

What if the outbound I tend to use, which has the highest bandwidth and most features (like AI and streaming), isn't the one with the lowest latency?

@HaradaKashiwa
Copy link

Wouldn't putting urltest in urltest outbound work?

Could you explain in more detail? I can't imagine the difference between using just one urltest and using two or more.

What if the outbound I tend to use, which has the highest bandwidth and most features (like AI and streaming), isn't the one with the lowest latency?

Maybe you need fallback

@se1jaku
Copy link
Author

se1jaku commented Oct 5, 2024

As @fouvromenth explained, a nested urltest does not help in this situation. It can only filter out outbounds that failed to pass the test.

In reality, different outbounds have different properties. In most cases, I think, a manual sorting will be better than an automatic latency-based sorting.

@se1jaku
Copy link
Author

se1jaku commented Oct 5, 2024

By the way, naming the outbound Fallback is quite ambiguous literally. It sounds like sth really unexpected will take place, meanwhile, the substitutions of selected outbounds in the background is more like a series of expected behaviors.

That is the reason why I think Backup is a better name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants