Redirect service for kagi.com https://kagi.apps.ciepiela.org
  • Go 74.1%
  • JavaScript 16.2%
  • HTML 5.1%
  • CSS 4.2%
  • Dockerfile 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dawid Ciepiela 0ead7646d3
All checks were successful
coverage: Test / test 26.0%
Test / test (push) Successful in 3m2s
Merge pull request 'chore: the README's pictures in Git LFS' (#53) from screenshots-lfs into main
Reviewed-on: #53
2026-11-20 17:56:12 +00:00
.forgejo/workflows ci: the test results and coverage as a comment on the pull request 2026-11-20 14:14:12 +01:00
.vscode chore: improve director 2025-12-29 22:44:15 +01:00
cmd/kagi-proxy feat: banner and threads per user 2026-09-04 21:56:27 +02:00
doc chore: the README's pictures in Git LFS 2026-11-20 18:47:03 +01:00
examples regenerate examples 2025-01-26 23:31:53 +01:00
pkg fix http transport 2026-10-13 23:26:23 +02:00
.cz.toml ci: the release bot's Commitizen configuration 2026-11-05 19:30:09 +01:00
.gitattributes chore: the README's pictures in Git LFS 2026-11-20 18:47:03 +01:00
.gitignore Initial commit 2025-01-18 15:24:22 +01:00
.golangci.yml fix: ensure direct request fingerprint (#41) 2026-09-04 11:53:35 +02:00
CHANGELOG.md chore(release): 0.0.26 2026-11-16 06:31:12 +00:00
Dockerfile fix: ensure direct request fingerprint (#41) 2026-09-04 11:53:35 +02:00
go.mod fix(deps): update module github.com/klauspost/compress to v1.20.4 2026-11-12 15:28:01 +00:00
go.sum fix(deps): update module github.com/klauspost/compress to v1.20.4 2026-11-12 15:28:01 +00:00
LICENSE Initial commit 2025-01-18 15:24:22 +01:00
README.md change FQDN 2026-10-13 22:58:29 +02:00
renovate.json ci(test): a test workflow on main, renovate/all-patch and pull requests; renovate.json without ignoreTests, so Renovate's patches merge once it passes instead of unchecked 2026-11-09 17:43:15 +01:00

kagi-proxy

Proxy service for © kagi.com. © Kagi offers a search engine as payware which is less vigilantly subjected to questionable SEO practices. Furthermore, it offers AI assistant service. The AI assistant ships most recent available GPT solutions under one subscription, e.g.:

  • Anthropic: Claude 3.5 Sonnet
  • OpenAI: GPT 4o
  • Google: Gemini Pro
  • Meta: Llama 3

Refer to help.kagi.com for more information.

The subscription is around 25$ each month for both the unlimited search engine and AI assistant services. Family plan is provided as well, whereas the fee rounds up to 20$ base rate + 15$ for each member per month. More about pricing their official site: kagi.com/pricing. I wrote a simple proxy service to make my personal © Kagi subscription shareable with my family only. I provide a reversed proxy behind TLS, basic authentication scheme, CSRF and DDoS protection by employing request throttling. I interfere with the kagi.com interface via DOM content mutation observation and JS injection to provide a seamless user experience.

Proxy is exposed behind kagi.apps.ciepiela.org:

screenshot

Every proxy user shares one © Kagi account, so the assistant would otherwise list the threads of everybody behind the proxy to everybody else. The proxy therefore scopes them: a thread belongs to the proxy session that opened it first, which is the session that created it, its address is refused for anyone else, and the sidebar hides the rows that lead nowhere. Pass -proxy-private-threads=false to turn that off and go back to one shared thread history. A small badge in the corner of every proxied page names the session and offers a way to sign out of the proxy without ending the shared © Kagi session.

In the case, you are interested to run the proxy yourself, you need to setup a VM in the cloud and configure DNS to support wildcard domains corresponding to *.kagi.com and kagi.com. The proxy web service is freely configurable via its CLI:

Usage of kagi-proxy:
  -ip2location-api-key string
     API key for the IP2Location API
  -limit-burst uint
     burst size for rate limiting (default 12)
  -limit-rps float
     requests per second for rate limiting (default 90)
  -port uint
     port to listen on (default 8080)
  -proxy-extra-policy string
     path to a JSON file with additional policy rules, see https://github.com/sarumaj/kagi-proxy/tree/main/examples
  -proxy-host string
     proxy domain (default "kagi.com")
  -proxy-otp-secret string
     OTP encryption secret for the proxy session (default "test")
  -proxy-pass string
     proxy user password (default "pass")
  -proxy-private-threads
     scope assistant threads to the proxy session that created them (default true)
  -proxy-session-duration duration
     session duration for the proxy session (default 720h0m0s)
  -proxy-session-secret string
     cookie encryption secret for the proxy session (default "test")
  -proxy-user string
     proxy user (default "user")
  -session-token string
     session token for the Kagi website