Git Product home page Git Product logo

ddathome-nodejs's People

Contributors

8miyile avatar dependabot-preview[bot] avatar dependabot[bot] avatar eight04 avatar radekyspec avatar simon300000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ddathome-nodejs's Issues

Pass options to the CLI

Currently, we have to set env variables for configuration:

cmd /c "SET VERBOSE=1 && SET INTERVAL=2000 && npx dd-center/DDatHome-nodejs"

It will be nice if we can pass them to the CLI directly:

npx dd-center/DDatHome-nodejs --verbose --interval 2000

I can file a PR using neodoc if you like.

add:platform内容增加

url.searchParams.set('platform', process.platform)

这行参数需要增加process.arch变量
效果如 linux-amd64
大概修改成这样

url.searchParams.set('platform', '${process.platform}-${process.arch}') 
 

Add CLI

So users can run this tool by simply executing the npx command:

npx dd-center/DDatHome-nodejs

Avoid code duplication with DDatElectron

Some code is duplicated with https://github.com/dd-center/DDatElectron/blob/3d76a744219360debe35cdb6772d9f8d79b4b4be/src/ws.js

I think we can make DDatHome-nodejs more modular, so DDatElectron can use it. Imagine something like:

const ddCore = require("DDatHome-nodejs");
ddCore.startDD({
  interval: await getInterval()
  runtime: `DDatHomeCore ${ddCore.version}, DDatElectron ${...}, Electron ${...}`,
  ... // and other configurable options
  onlog(logLevel, message) {
    // redirect log to the UI
  }
});

It also helps #1 by making the current code more modular,

减少反复请求解析相关域名

我在家用网络中使用自己的DNS服务器过滤广告,但是在开始运行DD@H之后,DNS服务器的日志数据库开始膨胀了起来,检查后,发现运行DD@H的设备非常频繁地请求B站直播相关的域名。
经过一段时间的测试,我发现程序运行一天,DNS服务器上增加了约2.9万条相关域名的查询记录。这严重拖慢了DNS服务器的响应速度,并导致闪存设备的快速损耗。
请问有没有可能在DD@H中增加缓存DNS查询结果的方法,以减少这种频繁重复DNS查询的现象?

image

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.