Skip to content

Commit b0b61ca

Browse files
authored
Update oracle.mdx
Changed the way we suggest to create the psk for Oracle with js/workers
1 parent add2ffb commit b0b61ca

File tree

1 file changed

+4
-15
lines changed
  • src/content/docs/magic-wan/configuration/manually/third-party

1 file changed

+4
-15
lines changed

src/content/docs/magic-wan/configuration/manually/third-party/oracle.mdx

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ This tutorial provides information and examples of how to configure IPsec betwee
77

88
## Prerequisites
99

10-
You need a pre-shared key to establish the IPsec tunnel. You can use [Cloudflare Workers](/workers/) to create a random key. For example:
10+
You need a pre-shared key to establish the IPsec tunnel. You can use the following code to create a random key:
1111

1212
```js
13-
export default {
14-
async fetch() {
15-
1613
const a = new Uint8Array(48);
1714
crypto.getRandomValues(a);
1815
let base64String = btoa(String.fromCharCode.apply(null, a));
@@ -21,22 +18,14 @@ export default {
2118
.replace(/\//g, '')
2219
.replace(/=/g, '');
2320

24-
const finalString = base64String.substring(0, 32);
25-
26-
return new Response(finalString, {
27-
headers: {
28-
"content-type": "text/html",
29-
},
30-
});
31-
},
32-
};
21+
console.log(base64String.substring(0, 32));
3322
```
3423

3524
:::caution
36-
The code above is an example of how you might use Cloudflare Workers to generate a random key. However, make sure you generate a code that is strong enough to comply with your security needs.
25+
The code above is an example of how you might generate a random key. However, make sure you generate a key that is strong enough to comply with your security needs.
3726
:::
3827

39-
You can use the [Workers playground](https://workers.cloudflare.com/playground#LYVwNgLglgDghgJwgegGYHsHALQBM4RwDcABAEbogB2+CAngLzbPYDqApmQNJQQBimYACFKNRHSoBzAB4ArAEoBBANYR5AEVYAJAOJCAagA0AXCxYduvAVhHVaEmQpVrNug4YCwAKADC6KhDsAdjqUADOMOhhvFD+xiQYWHgExCRUcMDsDABEUDTs0gB0smHZpKhQYEEZWbn5RSXZ3n4BQRDYACp0MOzxcDAwYFAAxgSxVMiycABucGHDCLAQANTA6Ljg7N7eBZFIJLjsqHDgECQA3l4AkHMSwwnsEMMAFgAUAJQXXtdXw-5hZzgJAYaXYAHcSABVPIQAAcigQCDgdFeABZYe8iD8Ft0IOhCpJHvI4DR0MB9HAwCB2GFXnBMT8qmcyHN2AA2VEAZQgiykwPIeLgr25vMkhVQCDJPmeiD8h0K-UGKKo4DAABoSPSGT8WWF2VyeXlJPzdfqRUbCgh2IM4MN2K9kAAdZbISQagDk7vePyuvr9JADlutYFt9qdyFdHq9Pr9voDJCDNrtDoYkZInu1vr+VABCTylPNfJBpo5hbFYRAZABoteAAYNQBmABMmauVogIAQVFBEPkNMiOftFXSYDLGsufue7DghwQYXiE792WzgWCEG67Gy8WygWkKGeEGAYGyap9AF9T76zwyrhevGesd4zMwLDx+IJbGJ6FI5EpVBptD0Ixmn8Vd2lCCIohiOIEkEZJCFIdJMhyTJCHwQgyjzKokNqMgwHQMgml8UC2k6Dc+gGIZRmgfxJjCfxti8c5lzJeBoDISpeDoAB9dDN2MbIm1rJtUWwWsGzEgB2E8WOANioA4oZ1241AQ0kUpjAAbWyKh1nYEpuL+OSCGyABdNVsmAOA8m4tYNiqLc6kOBpSjPJ9n1fKwP1Eewfycf9XCAwxmG8IA) to try this Worker.
28+
You can try this code in the [Workers playground](https://workers.cloudflare.com/playground#LYVwNgLglgDghgJwgegGYHsHALQBM4RwDcABAEbogB2+CAngLzbPYDqApmQNJQQBimYACFKNRHSoBzAB4ArAEoBBANYR5AEVYAJAOJCAagA0AXCxYduvAVhHVaEmQpVrNug4YCwAKADC6KhDsAdjqUADOMOhhvFD+xiQYWHgExCRUcMDsDABEUDTs0gB0smHZpKhQYEEZWbn5RSXZ3n4BQRDYACp0MOzxcDAwYFAAxgSxVMiycABucGHDCLAQANTA6Ljg7N7eBZFIJLjsqHDgECQA3l4AkHMSwwnsEMMAFgAUAJQXXtdXw-5hZzgJAYaXYAHcSABVPIQAAcigQCDgdFeABZYe8iD8Ft0IOhCpJHvI4DR0MB9HAwCB2GFXnBMT8qmcyHN2AA2VEAZQgiykwPIeLgr25vMkhVQCDJPmeiD8h0K-UGKKo4DAABoSPSGT8WWF2VyeXlJPzdfqRUbCgh2IM4MN2K9kAAdZbISQagDk7vePyuvr9JADlutYFt9qdyFdHq9Pr9voDJCDNrtDoYkZInu1vr+VABCTylPNfJBpo5hbFYRAZABoteAAYNQBmABMmauVogIAQVFBEPkNMiOftFXSYDLGsufue7DghwQYXiE792WzgWCEG67Gy8WygWkKGeEGAYGyap9AF9T76zwyrhevGesd4zMwLDx+IJbGJ6FI5EpVBptD0Ixmn8Vd2lCCIohiOIEkEZJCFIdJMhyTJCHwQgyjzKokNqMgwHQMgml8UC2k6Dc+gGIZRmgfxJjCfxti8c5lzJeBoDISpeDoAB9dDN2MbIm1rJtUWwWsGzEgB2E8WOANioA4oZ1241AQ0kUpjAAbWyKh1nYEpuL+OSCGyABdNVsmAOA8m4tYNiqLc6kOBpSjPJ9n1fKwP1Eewfycf9XCAwxmG8IA) to try this Worker.
4029

4130
## Oracle Cloud
4231

0 commit comments

Comments
 (0)