Code Monkey home page Code Monkey logo

jsproxy-browser's Issues

关于使用消息传递的方式设置Cookie的疑问

sendMsgToPages(MSG.SW_COOKIE_PUSH, cookies)

我的理解是,因为构造 Response 的原因,没法带上Set-cookie头,所以要这样另外设置 cookie,但是如何保证不会出现这样的情况:

异步设置 Cookie 成功之前,响应已经交回给浏览器,浏览器解析响应里的 js 脚本,该脚本试图读取 Cookie,此时对 Cookie 的设置还未完成。

代码执行环境请教

function main(global) {
if ('onclick' in global) {
pageEnv(global)
} else if ('onfetch' in global) {
swEnv()
} else {
workerEnv(global)
}
}

上面代码中的 pageEnv 应该是注入的 help.js,swEnv 应该是浏览器的 service worker,最后那个 workerEnv 是什么环境执行的?

[question] bundle.debug.js 这个是怎么编译出来的?

想单步运行学习一下代码
不过目前项目debug.sh出来也是压缩混淆后的代码
工程直接用到了bundle.debug.js,请问这个是怎么生成的

总之不知道如何调试运行代码来贡献这个工程

还望指导说明

请问能否和 jsproxy 主仓库的代码同步

作者你好!最近正好在学习相关的技术,想研究下代码。

发现编译后,hash 值与主仓库中提供的 bundle.js 不一致,经过检查,似乎 jsproxy-browser 里的代码要落后几个版本?
不知能否劳烦作者更新一下代码呢?

找到的不同处(例):
https://github.com/EtherDream/jsproxy-browser/blob/master/src/proxy/src/path.js#L31

此处的正则在本仓库中使用的均为 /[^/]+$/,而在主仓库中使用的是 /[^\/]+$/

执行 proxy/debug.sh 更新时卡住

jsproxy@iZt4ndq9lezw04r8afm7d2Z:~/jsproxy-browser/src/proxy$ ./debug.sh 

webpack is watching the files…

Hash: a1847af0e4334b91a1bf
Version: webpack 4.30.0
Time: 489ms
Built at: 05/06/2019 5:27:17 PM
Asset     Size  Chunks             Chunk Names
 x.js  181 KiB    main  [emitted]  main
Entrypoint main = x.js
[./src/client.js] 2.67 KiB {main} [built]
[./src/cookie.js] 6.14 KiB {main} [built]
[./src/env.js] 1.11 KiB {main} [built]
[./src/fakeloc.js] 3.81 KiB {main} [built]
[./src/hook.js] 5.33 KiB {main} [built]
[./src/index.js] 1.08 KiB {main} [built]
[./src/inject.js] 1.04 KiB {main} [built]
[./src/jsfilter.js] 750 bytes {main} [built]
[./src/lock-native.js] 1.28 KiB {main} [built]
[./src/msg.js] 328 bytes {main} [built]
[./src/network.js] 6.64 KiB {main} [built]
[./src/page.js] 15.2 KiB {main} [built]
[./src/storage.js] 3.5 KiB {main} [built]
[./src/sw.js] 7.4 KiB {main} [built]
[./src/urlx.js] 2.28 KiB {main} [built]
    + 4 hidden modules

脚本运行

想问一个问题,这两个脚本为什么我运行不了呢
提示proxy/debug.sh: line 2: webpack: command not found

为什么sw.js会运行在3种环境

function main(global) {
  if ('onclick' in global) {
    pageEnv(global)
  } else if ('onfetch' in global) {
    swEnv()
  } else {
    workerEnv(global)
  }
}

你好,sw.js不是通过navigator.serviceWorker.register注册成serviceWorker么,怎么会出现页面环境和普通的worker环境呢?求解答

Error in Mobile version

Error message:
浏览器版本过低,推荐使用最新版 Chrome 浏览器
App Version:
5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/74.0.3729.121 Mobile/15E148 Safari/605.1
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.