mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-21 03:47:31 +03:00
mitm: Refactor & Add url
This commit is contained in:
@@ -21,9 +21,9 @@ type Source interface {
|
||||
|
||||
func NewSource(ctx context.Context, logger logger.Logger, options option.Script) (Source, error) {
|
||||
switch options.Source {
|
||||
case C.ScriptSourceLocal:
|
||||
case C.ScriptSourceTypeLocal:
|
||||
return NewLocalSource(ctx, logger, options)
|
||||
case C.ScriptSourceRemote:
|
||||
case C.ScriptSourceTypeRemote:
|
||||
return NewRemoteSource(ctx, logger, options)
|
||||
default:
|
||||
return nil, E.New("unknown source type: ", options.Source)
|
||||
|
||||
Reference in New Issue
Block a user