-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds certificate validation on provider proxy
- Loading branch information
Showing
27 changed files
with
1,523 additions
and
68 deletions.
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{ | ||
"dependencies": { | ||
"@akashnetwork/net": "0.0.1" | ||
}, | ||
"devDependencies": { | ||
"@akashnetwork/dev-config": "1.0.0" | ||
} | ||
|
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 |
---|---|---|
@@ -1,7 +1,15 @@ | ||
import { netConfig, SupportedChainNetworks } from "@akashnetwork/net"; | ||
|
||
import { ProviderProxy } from "./services/ProviderProxy"; | ||
import { WebsocketStats } from "./services/WebsocketStats"; | ||
|
||
export const container = { | ||
wsStats: new WebsocketStats(), | ||
providerProxy: new ProviderProxy() | ||
providerProxy: new ProviderProxy(Date.now, (network: SupportedChainNetworks) => { | ||
// TEST_CHAIN_NETWORK_URL is hack for functional tests | ||
// there is no good way to mock external server in nodejs | ||
// both nock and msw do not work well when I need to use low level API like X509 certificate validation | ||
// for some reason when those libraries are used I receive MockSocket instead of TLSSocket | ||
return process.env.TEST_CHAIN_NETWORK_URL || netConfig.getBaseAPIUrl(network); | ||
}) | ||
}; |
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.