[GH-ISSUE #2990] [求助]有没有用frp做内网穿透访问code-server的 #2386

Closed
opened 2026-05-05 13:32:15 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @HuaWang135608 on GitHub (Jun 21, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2990

Describe the feature request

服务器部署了code-server,使用frp做内网穿透访问,但是打不开 ipynb 文件,会一直加载空窗口;问下有没有遇到同样问题的老哥,求助一下。

浏览器报错如下:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' 'sha256-HuyBNEnumn/Bw3njx2R0EXAv9HicWHLQQd9NJ9ruyrk=' 'sha256-tANAW9Bd3+GA2+NoZNIhDZgoM7p8337ALjYfZSvvZ2M=' 'sha256-yxwQ9j8YGPsfU554CNGiSCW08z5yqDVvuQmssjoPsm8=' 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=' http://remote". Either the 'unsafe-inline' keyword, a hash ('sha256-rwMOiOeVICH7/Cjy5SkreID3OOi5HTrit357k22hUDQ='), or a nonce ('nonce-...') is required to enable inline execution.

t @ VM6:1
VM6:1 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=' https:". Either the 'unsafe-inline' keyword, a hash ('sha256-rwMOiOeVICH7/Cjy5SkreID3OOi5HTrit357k22hUDQ='), or a nonce ('nonce-...') is required to enable inline execution.

t @ VM6:1
log.ts:301  INFO Ignoring configured affinity for 'pub.name' because the extension is unknown or cannot execute.
log.ts:313   ERR Can't compute sha-256: Error: Can't compute sha-256
    at t (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:798:15149)
    at new F (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:1351:9435)
    at v._createInstance (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:607:1332)
    at v.createInstance (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:607:773)
    at I.createWebviewElement (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:1351:21856)
    at B._createInset (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:1954:7308)
    at B._initialize (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:1954:413)
    at http://myip:30605/static/out/vs/workbench/workbench.web.main.js:1950:53
VM6:1 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' 'sha256-HuyBNEnumn/Bw3njx2R0EXAv9HicWHLQQd9NJ9ruyrk=' 'sha256-tANAW9Bd3+GA2+NoZNIhDZgoM7p8337ALjYfZSvvZ2M=' 'sha256-yxwQ9j8YGPsfU554CNGiSCW08z5yqDVvuQmssjoPsm8=' 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=' http://remote". Either the 'unsafe-inline' keyword, a hash ('sha256-rwMOiOeVICH7/Cjy5SkreID3OOi5HTrit357k22hUDQ='), or a nonce ('nonce-...') is required to enable inline execution.

t @ VM6:1
log.ts:313   ERR [Extension Host] (node:7962) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
console.ts:137 [Extension Host] (node:7962) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
D @ console.ts:137
console.ts:137 [Extension Host] rejected promise not handled within 1 second: Error: Module 'pip' not installed.
D @ console.ts:137
console.ts:137 [Extension Host] stack trace: Error: Module 'pip' not installed.
	at s.execModule (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:850394)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async r.getPackageInformation (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:1160501)
D @ console.ts:137
mainThreadExtensionService.ts:75 [[object Object]]Module 'pip' not installed.
$onExtensionRuntimeError @ mainThreadExtensionService.ts:75
mainThreadExtensionService.ts:76 Error: Module 'pip' not installed.
	at s.execModule (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:850394)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async r.getPackageInformation (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:1160501)
$onExtensionRuntimeError @ mainThreadExtensionService.ts:76
console.ts:137 [Extension Host] rejected promise not handled within 1 second: Error: Module 'pip' not installed.
D @ console.ts:137
console.ts:137 [Extension Host] stack trace: Error: Module 'pip' not installed.
	at s.execModule (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:850394)
	at async r.getPackageInformation (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:1160501)
D @ console.ts:137
mainThreadExtensionService.ts:75 [[object Object]]Module 'pip' not installed.
$onExtensionRuntimeError @ mainThreadExtensionService.ts:75
mainThreadExtensionService.ts:76 Error: Module 'pip' not installed.
	at s.execModule (:30605/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:850394)
	at async r.getPackageInformation (:30605/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:1160501)

Describe alternatives you've considered

如果使用frp做https代理需要做哪些配置?

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @HuaWang135608 on GitHub (Jun 21, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/2990 ### Describe the feature request 服务器部署了code-server,使用frp做内网穿透访问,但是打不开 `ipynb` 文件,会一直加载空窗口;问下有没有遇到同样问题的老哥,求助一下。 浏览器报错如下: ``` Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' 'sha256-HuyBNEnumn/Bw3njx2R0EXAv9HicWHLQQd9NJ9ruyrk=' 'sha256-tANAW9Bd3+GA2+NoZNIhDZgoM7p8337ALjYfZSvvZ2M=' 'sha256-yxwQ9j8YGPsfU554CNGiSCW08z5yqDVvuQmssjoPsm8=' 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=' http://remote". Either the 'unsafe-inline' keyword, a hash ('sha256-rwMOiOeVICH7/Cjy5SkreID3OOi5HTrit357k22hUDQ='), or a nonce ('nonce-...') is required to enable inline execution. t @ VM6:1 VM6:1 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=' https:". Either the 'unsafe-inline' keyword, a hash ('sha256-rwMOiOeVICH7/Cjy5SkreID3OOi5HTrit357k22hUDQ='), or a nonce ('nonce-...') is required to enable inline execution. t @ VM6:1 log.ts:301 INFO Ignoring configured affinity for 'pub.name' because the extension is unknown or cannot execute. log.ts:313 ERR Can't compute sha-256: Error: Can't compute sha-256 at t (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:798:15149) at new F (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:1351:9435) at v._createInstance (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:607:1332) at v.createInstance (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:607:773) at I.createWebviewElement (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:1351:21856) at B._createInset (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:1954:7308) at B._initialize (http://myip:30605/static/out/vs/workbench/workbench.web.main.js:1954:413) at http://myip:30605/static/out/vs/workbench/workbench.web.main.js:1950:53 VM6:1 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' 'sha256-HuyBNEnumn/Bw3njx2R0EXAv9HicWHLQQd9NJ9ruyrk=' 'sha256-tANAW9Bd3+GA2+NoZNIhDZgoM7p8337ALjYfZSvvZ2M=' 'sha256-yxwQ9j8YGPsfU554CNGiSCW08z5yqDVvuQmssjoPsm8=' 'sha256-fh3TwPMflhsEIpR8g1OYTIMVWhXTLcjQ9kh2tIpmv54=' http://remote". Either the 'unsafe-inline' keyword, a hash ('sha256-rwMOiOeVICH7/Cjy5SkreID3OOi5HTrit357k22hUDQ='), or a nonce ('nonce-...') is required to enable inline execution. t @ VM6:1 log.ts:313 ERR [Extension Host] (node:7962) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use `node --trace-deprecation ...` to show where the warning was created) console.ts:137 [Extension Host] (node:7962) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use `node --trace-deprecation ...` to show where the warning was created) D @ console.ts:137 console.ts:137 [Extension Host] rejected promise not handled within 1 second: Error: Module 'pip' not installed. D @ console.ts:137 console.ts:137 [Extension Host] stack trace: Error: Module 'pip' not installed. at s.execModule (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:850394) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async r.getPackageInformation (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:1160501) D @ console.ts:137 mainThreadExtensionService.ts:75 [[object Object]]Module 'pip' not installed. $onExtensionRuntimeError @ mainThreadExtensionService.ts:75 mainThreadExtensionService.ts:76 Error: Module 'pip' not installed. at s.execModule (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:850394) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async r.getPackageInformation (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:1160501) $onExtensionRuntimeError @ mainThreadExtensionService.ts:76 console.ts:137 [Extension Host] rejected promise not handled within 1 second: Error: Module 'pip' not installed. D @ console.ts:137 console.ts:137 [Extension Host] stack trace: Error: Module 'pip' not installed. at s.execModule (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:850394) at async r.getPackageInformation (/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:1160501) D @ console.ts:137 mainThreadExtensionService.ts:75 [[object Object]]Module 'pip' not installed. $onExtensionRuntimeError @ mainThreadExtensionService.ts:75 mainThreadExtensionService.ts:76 Error: Module 'pip' not installed. at s.execModule (:30605/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:850394) at async r.getPackageInformation (:30605/home/hw/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.3.1000901801/out/extension.js:2:1160501) ``` ### Describe alternatives you've considered 如果使用frp做https代理需要做哪些配置? ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [X] Others
Author
Owner

@Becods commented on GitHub (Jun 22, 2022):

Module 'pip' not installed.

Enable HTTPS for local HTTP(S) service

<!-- gh-comment-id:1163178806 --> @Becods commented on GitHub (Jun 22, 2022): **Module 'pip' not installed.** [Enable HTTPS for local HTTP(S) service ](https://github.com/fatedier/frp#enable-https-for-local-https-service)
Author
Owner

@HuaWang135608 commented on GitHub (Jun 22, 2022):

远程桌面测试可用,使用代理后无法加载jupyter notebook;pip也安装了,在对应的仓库问了好几天了,实在解决不掉😭-------- 原始邮件 --------发件人: 蓝云Reyes @.>日期: 2022年6月22日周三 22:31收件人: fatedier/frp @.>抄送: HuaWang135608 @.>, Author @.>主 题: Re: [fatedier/frp] [求助]有没有用frp做内网穿透访问code-server的 (Issue #2990)

Module 'pip' not installed.

Enable HTTPS for local HTTP(S) service

另外

能不能搞清楚问题的主体再去对应的仓库问啊

能不能本地测试一下再上frp啊

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

<!-- gh-comment-id:1163201459 --> @HuaWang135608 commented on GitHub (Jun 22, 2022): 远程桌面测试可用,使用代理后无法加载jupyter notebook;pip也安装了,在对应的仓库问了好几天了,实在解决不掉😭-------- 原始邮件 --------发件人: 蓝云Reyes ***@***.***>日期: 2022年6月22日周三 22:31收件人: fatedier/frp ***@***.***>抄送: HuaWang135608 ***@***.***>, Author ***@***.***>主 题: Re: [fatedier/frp] [求助]有没有用frp做内网穿透访问code-server的 (Issue #2990) Module 'pip' not installed. Enable HTTPS for local HTTP(S) service 另外 能不能搞清楚问题的主体再去对应的仓库问啊 能不能本地测试一下再上frp啊 —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
Author
Owner

@Becods commented on GitHub (Jun 22, 2022):

nginx反代重写
具体方法看官方文档

<!-- gh-comment-id:1163269475 --> @Becods commented on GitHub (Jun 22, 2022): nginx反代重写 具体方法看官方文档
Author
Owner

@HuaWang135608 commented on GitHub (Jun 22, 2022):

nginx反代重写 具体方法看官方文档

好的,code-server那边的解决方法之一就是nginx代理。
谢谢您的回复。

<!-- gh-comment-id:1163293837 --> @HuaWang135608 commented on GitHub (Jun 22, 2022): > nginx反代重写 具体方法看官方文档 好的,code-server那边的解决方法之一就是nginx代理。 谢谢您的回复。
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: github-starred/frp#2386
No description provided.