mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 16:14:02 +03:00
Remove integration with gotd
This commit is contained in:
+1
-10
@@ -300,9 +300,7 @@ func NewProxy(opts ProxyOpts) (*Proxy, error) {
|
||||
return nil, fmt.Errorf("invalid settings: %w", err)
|
||||
}
|
||||
|
||||
logger := opts.getLogger("proxy")
|
||||
|
||||
tg, err := dc.New(logger.Named("telegram"), opts.getPreferIP(), opts.DCOverrides)
|
||||
tg, err := dc.New(opts.getPreferIP(), opts.DCOverrides)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot build telegram dc fetcher: %w", err)
|
||||
}
|
||||
@@ -324,13 +322,6 @@ func NewProxy(opts ProxyOpts) (*Proxy, error) {
|
||||
telegram: tg,
|
||||
}
|
||||
|
||||
dcUpdateEach := opts.DCUpdateEach
|
||||
if dcUpdateEach == 0 {
|
||||
dcUpdateEach = DefaultDCUpdateEach
|
||||
}
|
||||
|
||||
go tg.Run(ctx, dcUpdateEach)
|
||||
|
||||
pool, err := ants.NewPoolWithFunc(opts.getConcurrency(),
|
||||
func(arg interface{}) {
|
||||
proxy.ServeConn(arg.(essentials.Conn)) //nolint: forcetypeassert
|
||||
|
||||
Reference in New Issue
Block a user