config.go 446 B

1234567891011121314151617181920212223
  1. package proxyman
  2. func (s *AllocationStrategy) GetConcurrencyValue() uint32 {
  3. if s == nil || s.Concurrency == nil {
  4. return 3
  5. }
  6. return s.Concurrency.Value
  7. }
  8. func (s *AllocationStrategy) GetRefreshValue() uint32 {
  9. if s == nil || s.Refresh == nil {
  10. return 5
  11. }
  12. return s.Refresh.Value
  13. }
  14. func (c *ReceiverConfig) GetEffectiveSniffingSettings() *SniffingConfig {
  15. if c.SniffingSettings != nil {
  16. return c.SniffingSettings
  17. }
  18. return nil
  19. }