Commit Graph

25 Commits

Author SHA1 Message Date
Hadi 6a9935ec27 feat: add HTTPie export format in copy-as
- New toHTTPie() function builds an httpie command from raw request
- Added "httpie" case in formatAs() switch
- Uses util.ParseRawRequest; model lists httpie as a selectable format

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:38:50 +02:00
Hadi b490c7a0ac fix: use ParseRawRequest and cap response body in replay
- replay/update.go uses util.ParseRawRequest instead of inline parsing
- Response body capped with io.LimitReader at MaxBodySizeMB
- Uses util.SortedHeaderLines for deterministic header order
- Adds navigation key handling (GotoTop/Bottom/PrevPage/NextPage)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:38:41 +02:00
Hadi 1a1c0cff30 refactor: centralize raw HTTP parsing and header serialization
- Add internal/util/rawhttp.go with ParseRawRequest and SortedHeaderLines
- Refactor intercept/format.go and ui/intercept/helpers.go to use them
- Eliminates duplicated bufio.Reader + textproto parsing spread across 3+ files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:38:30 +02:00
Hadi 172a77e13b fix: security hardening and code quality
- SQL query mode uses read-only SQLite connection with PRAGMA query_only=ON
- Lua sandbox removes dofile/loadfile/load after OpenBase to block file access
- Plugin manager sorts by priority once at load time; GetPlugins is a plain copy
- Proxy appends [body truncated] marker when body hits size limit
- App startup exits with os.Exit(1) on DB open failure
- tickCmd uses tea.Tick instead of time.Sleep in a goroutine
- ErrMsg with non-nil error shows notification then quits
- DB stores path for use by read-only query connection
- WAL journal mode + NORMAL synchronous set in migrate()
- config.go uses errors.Is(err, os.ErrNotExist)
- main.go uses os.UserHomeDir() and removes racy port pre-check
- findings renderer is cached and rebuilt only on width change

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:38:10 +02:00
Hadi 41c0e489cf QOC
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-19 11:51:38 +02:00
Hadi b5e2721aa1 Center lines for asciimoji+text
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-19 11:04:52 +02:00
Hadi a147e8b972 QOL & Security improvement
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-19 10:09:42 +02:00
Hadi 03260e0947 Init copy as HAR
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-19 09:39:50 +02:00
Hadi 27e0c418e9 Add project name in sidebar
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-18 23:52:20 +02:00
Hadi 08757a5d1d Remove some keybindings in short help
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-18 23:51:54 +02:00
Hadi 3b6b58ac2b Change paginator dots when no entry
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-18 23:33:30 +02:00
Hadi 615093bd8b Add the config option "keep responses"
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-18 23:12:01 +02:00
Hadi e3e89582c1 Add commit hook & markdown scripts 2026-05-18 22:59:48 +02:00
Hadi 6ea692754a move docs to root
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-18 21:50:32 +02:00
Hadi 85c2806604 Add search in ui/docs
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-18 21:22:17 +02:00
Hadi d82a220e91 add extra space when icons are not rendered
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-18 20:40:28 +02:00
Hadi 1ac5eb26e8 Change popup width/height
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-18 20:34:52 +02:00
Hadi 969febb14c Change help menus: Only display shortcuts used on the page
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-18 20:23:56 +02:00
Hadi 2f4765bf37 Add asciimoji
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-13 22:26:26 +02:00
Hadi 9ab7f12bf4 gofmt
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-13 18:20:33 +02:00
Hadi c7392474b7 CopyRequest -> Copy & CopyAs
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-13 18:07:23 +02:00
Hadi 4eb9dd53f5 Change plugins behavior
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-13 16:52:12 +02:00
Hadi a6bd5c1071 Rename auto-forward -> toggle-intercept
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-12 22:25:10 +02:00
Hadi 7879720d07 Remove scope page
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-12 22:01:29 +02:00
Hadi e8e64eff12 Init
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
2026-05-12 19:12:29 +02:00