-
Notifications
You must be signed in to change notification settings - Fork 1
터널 응답 수정 및 리드미 수정 #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 터널 내부의 실제 HTTP 요청(GET/POST 등) 감지 및 파싱 - HTTP 요청과 응답의 올바른 매칭을 위한 요청 ID 추적 - 터널 이벤트 전송 기능으로 UI에 실제 HTTP 요청 표시 - CONNECT 요청은 터널 설정용이므로 UI 표시 제외
- 터널 모드에서 처리할 도메인 목록에 setup.icloud.com 추가 - Apple 서비스의 터널 모드 지원 확장
- CONNECT 요청은 터널 설정용이므로 UI에 표시하지 않음 - 터널 내부의 실제 HTTP 요청만 UI에 표시하도록 개선 - 터널 모드에서 실제 HTTP 요청/응답 처리 로직 분리
- CONNECT 요청의 host:port 형식 URI 올바른 파싱 - 네트워크 테이블에서 CONNECT 요청 URL 표시 개선 - 터널 모드 요청의 authority 및 pathname 처리 로직 개선
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modifies tunnel response handling and updates the README. The main focus is on improving CONNECT request handling in the proxy and cleaning up documentation.
Key changes:
- Enhanced CONNECT request handling to properly parse and display tunnel traffic in the UI
- Added HTTP request/response parsing within tunnels for better monitoring
- Removed outdated screenshots and build badge from README
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tauri-ui/src/widgets/network-table/lib/utils.ts | Added special handling for CONNECT requests in getAuthority() to return host:port format directly |
| tauri-ui/src/widgets/network-table/hooks/use-table-data.ts | Added CONNECT request detection to properly extract authority and pathname |
| tauri-ui/src-tauri/src/proxy_v2.rs | Added early return for CONNECT requests to prevent UI display and imported additional HTTP types |
| crates/proxyapi_v2/src/proxy/internal.rs | Added HTTP parsing functions for tunnel traffic monitoring and integrated tunnel event sending |
| crates/proxyapi_v2/src/hybrid_tls_handler.rs | Added "setup.icloud.com" to tunnel domain list |
| README.md | Removed build badge and screenshots section |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ); | ||
|
|
||
| // 가장 최근 요청 ID를 사용하여 응답 매칭 | ||
| let response_request_id = if let Some((latest_request_id, _)) = pending_requests.iter().last() { |
Copilot
AI
Oct 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using iter().last() on a HashMap is unreliable because HashMap iteration order is not deterministic. This could result in matching responses to incorrect requests. Consider using a VecDeque or maintaining insertion order with IndexMap to ensure proper request-response pairing.
| let host = headers.get("host") | ||
| .map(|h| h.split(':').next().unwrap_or(h)) | ||
| .unwrap_or_else(|| target_addr.split(':').next().unwrap_or("unknown")); |
Copilot
AI
Oct 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The nested unwrap_or calls make this code difficult to read. Consider extracting this logic into a helper function or simplifying with pattern matching for better clarity.
| use proxy_v2_models::{ProxiedRequest, ProxiedResponse}; | ||
| use hyper::{StatusCode, Version}; | ||
| use http::HeaderMap; |
Copilot
AI
Oct 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These imports are duplicated from the module-level imports at lines 21-22. The local imports should be removed to avoid redundancy.
| use proxy_v2_models::{ProxiedRequest, ProxiedResponse}; | |
| use hyper::{StatusCode, Version}; | |
| use http::HeaderMap; |
| use proxy_v2_models::{ProxiedRequest, ProxiedResponse}; | ||
| use hyper::{StatusCode, Version}; | ||
| use http::HeaderMap; | ||
|
|
Copilot
AI
Oct 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These imports are duplicated from the module-level imports at lines 21-22. The local imports should be removed to avoid redundancy.
| use proxy_v2_models::{ProxiedRequest, ProxiedResponse}; | |
| use hyper::{StatusCode, Version}; | |
| use http::HeaderMap; |
| // CONNECT 요청의 경우 host:port 형식이므로 그대로 반환 | ||
| if (uri.includes(':') && !uri.startsWith('http')) { | ||
| return uri; | ||
| } |
Copilot
AI
Oct 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is duplicated in both the try block (lines 12-14) and catch block (lines 20-22). Consider extracting it into a helper function to eliminate duplication.
터널 응답 수정 및 리드미 수정