[GH-ISSUE #715] "Drop connection" in the Scripting #711

Open
opened 2026-03-03 19:21:12 +03:00 by kerem · 1 comment
Owner

Originally created by @NghiaTranUIT on GitHub (Dec 3, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/715

Originally assigned to: @NghiaTranUIT on GitHub.

Description

At the moment, there is no way to drop the connection in the Scripting, we should support it. The syntax might be:

function onRequest() {
    abort();
}

Acceptance Criteria

  • Support abort() to drop the connection
Originally created by @NghiaTranUIT on GitHub (Dec 3, 2020). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/715 Originally assigned to: @NghiaTranUIT on GitHub. ### Description At the moment, there is no way to drop the connection in the Scripting, we should support it. The syntax might be: ```js function onRequest() { abort(); } ``` ### Acceptance Criteria - Support `abort()` to drop the connection
Author
Owner

@NghiaTranUIT commented on GitHub (Oct 6, 2022):

Hey @nateroling and @skfaisalt

Here is the beta build for the Drop Connection by Scripting: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.10.0_Abort_a_connection_with_the_Scripting.dmg

function onRequest(context, url, request) {

  // Use the if to abort on certain conditions
  if (true) {
    abort();
    return; // Must return a void to stop the func
  }

  // Done
  return request;
}

Ref: https://docs.proxyman.io/scripting/snippet-code#abort-the-request-response-like-block-list-tool

<!-- gh-comment-id:1270363250 --> @NghiaTranUIT commented on GitHub (Oct 6, 2022): Hey @nateroling and @skfaisalt Here is the beta build for the Drop Connection by Scripting: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.10.0_Abort_a_connection_with_the_Scripting.dmg ```js function onRequest(context, url, request) { // Use the if to abort on certain conditions if (true) { abort(); return; // Must return a void to stop the func } // Done return request; } ``` Ref: https://docs.proxyman.io/scripting/snippet-code#abort-the-request-response-like-block-list-tool
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#711
No description provided.