Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

run.go 436B

1234567891011121314151617181920
  1. package cli
  2. import (
  3. "fmt"
  4. "github.com/9seconds/mtg/v2/internal/utils"
  5. )
  6. type Run struct {
  7. ConfigPath string `kong:"arg,required,type='existingfile',help='Path to the configuration file.',name='config-path'"` // nolint: lll
  8. }
  9. func (r *Run) Run(cli *CLI, version string) error {
  10. conf, err := utils.ReadConfig(r.ConfigPath)
  11. if err != nil {
  12. return fmt.Errorf("cannot init config: %w", err)
  13. }
  14. return runProxy(conf, version)
  15. }