|
|
本帖最后由 jizanyang3 于 2023-7-4 21:11 编辑
反代遇到html注入一段js代码到里面,劫持掉websocket,像这样
- (function() {
- let OldWebSocket = window.WebSocket;
- let proxyUrl = 'ws://your-reverse-proxy-server-url-here';
- window.WebSocket = function(url, protocols) {
- console.log('WebSocket request intercepted. Original url:', url, ', Modified url:', modifiedUrl);
- arguments[0] = url.replace(url, proxyUrl);
- return new OldWebSocket(...arguments);
- };
- window.WebSocket.prototype = OldWebSocket.prototype;
- window.WebSocket.prototype.constructor = window.WebSocket;
- }());
复制代码
不过我之前买了plus,认识的人基本也都会翻,就没继续搞这个思路,你试试看?
或者也有项目可以直接转成openai的api格式: https://github.com/juzeon/poe-openai-proxy |
|