-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: support Node.js 20 #16
Merged
Changes from 7 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f636e6c
📝2度目のDNS loopupでdestroyするとエラーが起きる
azu 6fad4f0
↩️ f636e6cc618ddaf2523513ce7f650d182a2b39bf
azu efa6f8e
fix: Node.js 20 support
azu 5b951e9
CI: Node. 12+
azu 67128bf
CI: Node. 14+
azu 0c53b42
CI: Node. 14+
azu 3dfbb3d
fix type
azu 6ae95db
CI: Node.js 16+
azu a0a348e
refactor!: remove `applyRequestFilter()` and `stopPortScanningByUrlRe…
azu 55cd37d
CI: remove Node.js 16
azu 622720f
fix comment
azu 1088aff
revert target
azu 9d6e555
Update yarn.lock
azu 0e0e01c
add comment
azu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,18 +86,22 @@ describe("request-filtering-agent", function () { | |
agent, | ||
timeout: 2000 | ||
}); | ||
console.log("???ss"); | ||
throw new ReferenceError("SHOULD NOT BE CALLED:" + ipAddress); | ||
} catch (error) { | ||
console.log("??" + error); | ||
if (error instanceof ReferenceError) { | ||
assert.fail(error); | ||
} | ||
} finally { | ||
console.log("??"); | ||
} | ||
} | ||
}); | ||
|
||
it("should allow http://127.0.0.1, but other private ip is disallowed", async () => { | ||
const agent = new RequestFilteringHttpAgent({ | ||
allowIPAddressList: ["127.0.0.1"], | ||
allowIPAddressList: ["127.0.0.1", "::1"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. localhost will be ::1 in some env. |
||
allowPrivateIPAddress: false | ||
}); | ||
const privateIPs = [`http://127.0.0.1:${TEST_PORT}`, `http://localhost:${TEST_PORT}`]; | ||
|
@@ -204,7 +208,10 @@ describe("request-filtering-agent", function () { | |
if (error instanceof ReferenceError) { | ||
assert.fail(error); | ||
} | ||
assert.ok(/It is private IP address/i.test(error.message), `Failed at ${ipAddress}, error: ${error}`); | ||
assert.ok( | ||
/Because, It is private IP address./i.test(error.message), | ||
`Failed at ${ipAddress}, error: ${error}` | ||
); | ||
} | ||
} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
avoid Node.js ERR_INTERNAL_ASSERTION: end -> destory.
Just call
destory
and Node.js throws ERR_INTERNAL_ASSERTION like #15