├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ ├── build-test.yaml │ └── lint.yaml ├── .golangci.yaml ├── .markdownlint.yaml ├── .yamllint ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── MAINTAINERS ├── README.md ├── bittorrent ├── bittorrent.go ├── bittorrent_test.go ├── client_id.go ├── client_id_test.go ├── event.go ├── event_test.go ├── params.go ├── params_test.go └── sanitize.go ├── cmd └── chihaya │ ├── config.go │ ├── e2e.go │ ├── main.go │ ├── signal_unix.go │ └── signal_windows.go ├── dist ├── example_config.yaml ├── helm │ └── chihaya │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── configmap.yaml │ │ ├── deployment.yaml │ │ └── service.yaml │ │ └── values.yaml └── prometheus │ └── prometheus.yaml ├── docs ├── architecture.dot ├── architecture.md ├── frontend.md ├── middleware │ └── interval_variation.md └── storage │ └── redis.md ├── frontend ├── frontend.go ├── http │ ├── bencode │ │ ├── bencode.go │ │ ├── decoder.go │ │ ├── decoder_test.go │ │ ├── encoder.go │ │ └── encoder_test.go │ ├── frontend.go │ ├── parser.go │ ├── prometheus.go │ ├── writer.go │ └── writer_test.go └── udp │ ├── bytepool │ └── bytepool.go │ ├── connection_id.go │ ├── connection_id_test.go │ ├── frontend.go │ ├── frontend_test.go │ ├── parser.go │ ├── parser_test.go │ ├── prometheus.go │ └── writer.go ├── go.mod ├── go.sum ├── middleware ├── clientapproval │ ├── clientapproval.go │ └── clientapproval_test.go ├── hooks.go ├── jwt │ └── jwt.go ├── logic.go ├── logic_test.go ├── middleware.go ├── pkg │ └── random │ │ ├── entropy.go │ │ ├── xorshift.go │ │ └── xorshift_test.go ├── torrentapproval │ ├── torrentapproval.go │ └── torrentapproval_test.go └── varinterval │ ├── varinterval.go │ └── varinterval_test.go ├── pkg ├── log │ └── log.go ├── metrics │ └── server.go ├── stop │ └── stop.go └── timecache │ ├── timecache.go │ └── timecache_test.go └── storage ├── memory ├── peer_store.go └── peer_store_test.go ├── prometheus.go ├── redis ├── peer_store.go ├── peer_store_test.go └── redis.go ├── storage.go ├── storage_bench.go └── storage_tests.go /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | --- 2 | github: 3 | - "jzelinskie" 4 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/.github/dependabot.yml -------------------------------------------------------------------------------- /.github/workflows/build-test.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/.github/workflows/build-test.yaml -------------------------------------------------------------------------------- /.github/workflows/lint.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/.github/workflows/lint.yaml -------------------------------------------------------------------------------- /.golangci.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/.golangci.yaml -------------------------------------------------------------------------------- /.markdownlint.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/.markdownlint.yaml -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/.yamllint -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/LICENSE -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/MAINTAINERS -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/README.md -------------------------------------------------------------------------------- /bittorrent/bittorrent.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/bittorrent/bittorrent.go -------------------------------------------------------------------------------- /bittorrent/bittorrent_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/bittorrent/bittorrent_test.go -------------------------------------------------------------------------------- /bittorrent/client_id.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/bittorrent/client_id.go -------------------------------------------------------------------------------- /bittorrent/client_id_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/bittorrent/client_id_test.go -------------------------------------------------------------------------------- /bittorrent/event.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/bittorrent/event.go -------------------------------------------------------------------------------- /bittorrent/event_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/bittorrent/event_test.go -------------------------------------------------------------------------------- /bittorrent/params.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/bittorrent/params.go -------------------------------------------------------------------------------- /bittorrent/params_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/bittorrent/params_test.go -------------------------------------------------------------------------------- /bittorrent/sanitize.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/bittorrent/sanitize.go -------------------------------------------------------------------------------- /cmd/chihaya/config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/cmd/chihaya/config.go -------------------------------------------------------------------------------- /cmd/chihaya/e2e.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/cmd/chihaya/e2e.go -------------------------------------------------------------------------------- /cmd/chihaya/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/cmd/chihaya/main.go -------------------------------------------------------------------------------- /cmd/chihaya/signal_unix.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/cmd/chihaya/signal_unix.go -------------------------------------------------------------------------------- /cmd/chihaya/signal_windows.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/cmd/chihaya/signal_windows.go -------------------------------------------------------------------------------- /dist/example_config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/dist/example_config.yaml -------------------------------------------------------------------------------- /dist/helm/chihaya/.helmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/dist/helm/chihaya/.helmignore -------------------------------------------------------------------------------- /dist/helm/chihaya/Chart.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/dist/helm/chihaya/Chart.yaml -------------------------------------------------------------------------------- /dist/helm/chihaya/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/dist/helm/chihaya/templates/NOTES.txt -------------------------------------------------------------------------------- /dist/helm/chihaya/templates/_helpers.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/dist/helm/chihaya/templates/_helpers.tpl -------------------------------------------------------------------------------- /dist/helm/chihaya/templates/configmap.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/dist/helm/chihaya/templates/configmap.yaml -------------------------------------------------------------------------------- /dist/helm/chihaya/templates/deployment.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/dist/helm/chihaya/templates/deployment.yaml -------------------------------------------------------------------------------- /dist/helm/chihaya/templates/service.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/dist/helm/chihaya/templates/service.yaml -------------------------------------------------------------------------------- /dist/helm/chihaya/values.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/dist/helm/chihaya/values.yaml -------------------------------------------------------------------------------- /dist/prometheus/prometheus.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/dist/prometheus/prometheus.yaml -------------------------------------------------------------------------------- /docs/architecture.dot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/docs/architecture.dot -------------------------------------------------------------------------------- /docs/architecture.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/docs/architecture.md -------------------------------------------------------------------------------- /docs/frontend.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/docs/frontend.md -------------------------------------------------------------------------------- /docs/middleware/interval_variation.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/docs/middleware/interval_variation.md -------------------------------------------------------------------------------- /docs/storage/redis.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/docs/storage/redis.md -------------------------------------------------------------------------------- /frontend/frontend.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/frontend.go -------------------------------------------------------------------------------- /frontend/http/bencode/bencode.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/http/bencode/bencode.go -------------------------------------------------------------------------------- /frontend/http/bencode/decoder.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/http/bencode/decoder.go -------------------------------------------------------------------------------- /frontend/http/bencode/decoder_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/http/bencode/decoder_test.go -------------------------------------------------------------------------------- /frontend/http/bencode/encoder.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/http/bencode/encoder.go -------------------------------------------------------------------------------- /frontend/http/bencode/encoder_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/http/bencode/encoder_test.go -------------------------------------------------------------------------------- /frontend/http/frontend.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/http/frontend.go -------------------------------------------------------------------------------- /frontend/http/parser.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/http/parser.go -------------------------------------------------------------------------------- /frontend/http/prometheus.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/http/prometheus.go -------------------------------------------------------------------------------- /frontend/http/writer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/http/writer.go -------------------------------------------------------------------------------- /frontend/http/writer_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/http/writer_test.go -------------------------------------------------------------------------------- /frontend/udp/bytepool/bytepool.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/udp/bytepool/bytepool.go -------------------------------------------------------------------------------- /frontend/udp/connection_id.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/udp/connection_id.go -------------------------------------------------------------------------------- /frontend/udp/connection_id_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/udp/connection_id_test.go -------------------------------------------------------------------------------- /frontend/udp/frontend.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/udp/frontend.go -------------------------------------------------------------------------------- /frontend/udp/frontend_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/udp/frontend_test.go -------------------------------------------------------------------------------- /frontend/udp/parser.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/udp/parser.go -------------------------------------------------------------------------------- /frontend/udp/parser_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/udp/parser_test.go -------------------------------------------------------------------------------- /frontend/udp/prometheus.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/udp/prometheus.go -------------------------------------------------------------------------------- /frontend/udp/writer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/frontend/udp/writer.go -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/go.sum -------------------------------------------------------------------------------- /middleware/clientapproval/clientapproval.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/clientapproval/clientapproval.go -------------------------------------------------------------------------------- /middleware/clientapproval/clientapproval_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/clientapproval/clientapproval_test.go -------------------------------------------------------------------------------- /middleware/hooks.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/hooks.go -------------------------------------------------------------------------------- /middleware/jwt/jwt.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/jwt/jwt.go -------------------------------------------------------------------------------- /middleware/logic.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/logic.go -------------------------------------------------------------------------------- /middleware/logic_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/logic_test.go -------------------------------------------------------------------------------- /middleware/middleware.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/middleware.go -------------------------------------------------------------------------------- /middleware/pkg/random/entropy.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/pkg/random/entropy.go -------------------------------------------------------------------------------- /middleware/pkg/random/xorshift.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/pkg/random/xorshift.go -------------------------------------------------------------------------------- /middleware/pkg/random/xorshift_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/pkg/random/xorshift_test.go -------------------------------------------------------------------------------- /middleware/torrentapproval/torrentapproval.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/torrentapproval/torrentapproval.go -------------------------------------------------------------------------------- /middleware/torrentapproval/torrentapproval_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/torrentapproval/torrentapproval_test.go -------------------------------------------------------------------------------- /middleware/varinterval/varinterval.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/varinterval/varinterval.go -------------------------------------------------------------------------------- /middleware/varinterval/varinterval_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/middleware/varinterval/varinterval_test.go -------------------------------------------------------------------------------- /pkg/log/log.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/pkg/log/log.go -------------------------------------------------------------------------------- /pkg/metrics/server.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/pkg/metrics/server.go -------------------------------------------------------------------------------- /pkg/stop/stop.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/pkg/stop/stop.go -------------------------------------------------------------------------------- /pkg/timecache/timecache.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/pkg/timecache/timecache.go -------------------------------------------------------------------------------- /pkg/timecache/timecache_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/pkg/timecache/timecache_test.go -------------------------------------------------------------------------------- /storage/memory/peer_store.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/storage/memory/peer_store.go -------------------------------------------------------------------------------- /storage/memory/peer_store_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/storage/memory/peer_store_test.go -------------------------------------------------------------------------------- /storage/prometheus.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/storage/prometheus.go -------------------------------------------------------------------------------- /storage/redis/peer_store.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/storage/redis/peer_store.go -------------------------------------------------------------------------------- /storage/redis/peer_store_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/storage/redis/peer_store_test.go -------------------------------------------------------------------------------- /storage/redis/redis.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/storage/redis/redis.go -------------------------------------------------------------------------------- /storage/storage.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/storage/storage.go -------------------------------------------------------------------------------- /storage/storage_bench.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/storage/storage_bench.go -------------------------------------------------------------------------------- /storage/storage_tests.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chihaya/chihaya/HEAD/storage/storage_tests.go --------------------------------------------------------------------------------