[GH-ISSUE #271] Block List #2: Logic #271

Open
opened 2026-03-03 19:49:32 +03:00 by kerem · 1 comment
Owner

Originally created by @NghiaTranUIT on GitHub (Jul 20, 2023).
Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/271

Originally assigned to: @kics223w1 on GitHub.

Description

Code Suggestion

  • We implement what we've done with Map Local, it means, we have
  1. BlockList Entry
  2. BlockListService

Ping @NghiaTranUIT for the Swift Code for reference.

Block Action

Screenshot 2023-07-20 at 20 13 01

1. Block & Hide Request

  • Select by default
  • If the request is blocked -> Never add it to the Flow Pool -> Never render it on the table view

2. Block & Display Request

  • If the request is blocked -> Generate a fake response with error = "Blocked Block List"
  • Add this request to the pool -> Render to the table view as normal

3. Hide, not Block

  • Simple never add this flow Pool -> Never display on the main table

Critical Logic

⚠️ Here is how they evaluate if the request should be blocked or not

Proxy Connect Mode

  1. When the Request is in Proxy Connect Mode (Not SSL Proxying, not decrypted data) (Func startProxyConnection(), Tunnel.ts)
  2. At this point, we already have the host + port
  3. We evaluate the request with the Block Tool
  4. If it's matched -> Close the socket immediately -> No need to wait for the body.
  5. Make sure we clean the tunnel -> Remove from the pool if needed.

HTTP / HTTPS with SSL Proxying

  1. When the request starts in the func startHTTPConnection()
  2. At this point, we have the URL -> evaluate with the Block List
  3. If it's Matched & Blocked!-> Close the socket immediately -> No need to wait for the body.
  4. Make sure we clean the tunnel -> Remove from the pool if needed. => If it's "Block & Hide"
Originally created by @NghiaTranUIT on GitHub (Jul 20, 2023). Original GitHub issue: https://github.com/ProxymanApp/proxyman-windows-linux/issues/271 Originally assigned to: @kics223w1 on GitHub. ## Description ## Code Suggestion - We implement what we've done with Map Local, it means, we have 1. BlockList Entry 2. BlockListService Ping @NghiaTranUIT for the Swift Code for reference. ## Block Action <img width="468" alt="Screenshot 2023-07-20 at 20 13 01" src="https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/9af984ab-ca0e-4295-ae3f-6b4631a8fb9c"> ### 1. Block & Hide Request - Select by default - If the request is blocked -> Never add it to the Flow Pool -> Never render it on the table view ### 2. Block & Display Request - If the request is blocked -> Generate a fake response with error = "Blocked Block List" - Add this request to the pool -> Render to the table view as normal ### 3. Hide, not Block - Simple never add this flow Pool -> Never display on the main table ## Critical Logic ⚠️ Here is how they evaluate if the request should be blocked or not ### Proxy Connect Mode 1. When the Request is in Proxy Connect Mode (Not SSL Proxying, not decrypted data) (Func `startProxyConnection()`, `Tunnel.ts`) 2. At this point, we already have the `host` + `port` 3. We evaluate the request with the Block Tool 4. If it's matched -> Close the socket immediately -> No need to wait for the body. 5. Make sure we clean the tunnel -> Remove from the pool if needed. ### HTTP / HTTPS with SSL Proxying 1. When the request starts in the func `startHTTPConnection()` 2. At this point, we have the URL -> evaluate with the Block List 3. If it's Matched & Blocked!-> Close the socket immediately -> No need to wait for the body. 4. Make sure we clean the tunnel -> Remove from the pool if needed. => If it's "Block & Hide"
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 20, 2023):

Note

<!-- gh-comment-id:1643948108 --> @NghiaTranUIT commented on GitHub (Jul 20, 2023): ### Note - Beware of this issue on macOS: https://github.com/ProxymanApp/Proxyman/issues/1716#issuecomment-1636619051 - When creating a new Block List Rule -> Don't automatically add the URL into the SSL Proxying List -> Otherwise, Proxyman will decrypt the HTTPS data and never release (Hide, but not Block)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxyman-windows-linux#271
No description provided.