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
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

.mise.toml 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. [tools]
  2. "go:golang.org/x/pkgsite/cmd/pkgsite" = "latest"
  3. "go:golang.org/x/tools/gopls" = "latest"
  4. "go:golang.org/x/vuln/cmd/govulncheck" = "latest"
  5. "go:mvdan.cc/gofumpt" = "latest"
  6. go = "latest"
  7. golangci-lint = "latest"
  8. goreleaser = "latest"
  9. [vars]
  10. fuzzflags = "-fuzztime=120s"
  11. [tasks.build]
  12. description = "Build binary"
  13. sources = ["**/*.go", "go.mod", "go.sum"]
  14. outputs = ["mtg"]
  15. run = "go build"
  16. [tasks.update]
  17. description = "Update dependencies"
  18. run = [
  19. "go get -u",
  20. "go mod tidy -go=1.25"
  21. ]
  22. [tasks.lint]
  23. description = "Run linter"
  24. run = "golangci-lint run"
  25. [tasks.vuln]
  26. description = "Test for vulnerabilities"
  27. run = "govulncheck ./..."
  28. [tasks.test]
  29. description = "Run tests"
  30. run = "go test -v ./..."
  31. [tasks.covtest]
  32. description = "Run tests with code coverage"
  33. run = "go test -coverprofile=coverage.txt -covermode=atomic -parallel 2 -race -v ./..."
  34. [tasks.test-all]
  35. description = "Run all tests"
  36. depends = [
  37. "test",
  38. "test:fuzz:*"
  39. ]
  40. [tasks."test:fuzz:client-hello"]
  41. description = "Run fuzzy test for ClientHello"
  42. run = "go test -v {{ vars.fuzzflags }} -fuzz=FuzzClientHello ./mtglib/internal/faketls"
  43. [tasks."test:fuzz:client-handshake"]
  44. description = "Run fuzzy test for ClientHandshake"
  45. run = "go test -v {{ vars.fuzzflags }} -fuzz=FuzzClientHandshake ./mtglib/internal/obfuscated2"
  46. [tasks."test:fuzz:server-generate-handshake-frame"]
  47. description = "Run fuzzy test for ServerGenerateHandshakeFrame"
  48. run = "go test -v {{ vars.fuzzflags }} -fuzz=FuzzServerGenerateHandshakeFrame ./mtglib/internal/obfuscated2"
  49. [tasks."test:fuzz:server-receive"]
  50. description = "Run fuzzy test for ServerReceive"
  51. run = "go test -v {{ vars.fuzzflags }} -fuzz=FuzzServerReceive ./mtglib/internal/obfuscated2"
  52. [tasks."test:fuzz:server-send"]
  53. description = "Run fuzzy test for ServerSend"
  54. run = "go test -v {{ vars.fuzzflags }} -fuzz=FuzzServerSend ./mtglib/internal/obfuscated2"
  55. [tasks.static]
  56. description = "Build static binary"
  57. sources = ["**/*.go", "go.mod", "go.sum"]
  58. outputs = ["mtg"]
  59. run = """
  60. #!/bin/bash
  61. version="$(git describe --exact-match HEAD 2>/dev/null || git describe --tags --always)"
  62. go build \
  63. -trimpath \
  64. -mod=readonly \
  65. -ldflags="-extldflags '-static' -s -w -X 'main.version=$version'" \
  66. -a \
  67. -tags netgo
  68. """
  69. [tasks.release]
  70. description = "Create release tarballs"
  71. sources = ["**/*.go", "go.mod", "go.sum", ".goreleaser.yml"]
  72. run = [
  73. "goreleaser --snapshot --clean",
  74. "find dist -depth 1 -type d | xargs -r rm -r",
  75. "rm ./dist/config.yaml"
  76. ]
  77. [tasks.image]
  78. description = "Build docker image"
  79. sources = ["**/*.go", "go.mod", "go.sum", "Dockerfile"]
  80. run = "docker buildx build --pull -t mtg ."
  81. [tasks.docs]
  82. description = "Run doc server"
  83. run = "pkgsite -http 0.0.0.0:10000"
  84. [tasks.fmt]
  85. description = "Reformat source code"
  86. sources = ["**/*.go"]
  87. run = "gofumpt -w --extra ."