Chromium 使用安全 DNS功能源码分析c++

news2024/11/27 16:51:16

一、选项页安全dns选项如下图:

二、那么如何自定义安全dns功能呢?

1、先看前端部分代码调用

shared.rollup.js

class PrivacyPageBrowserProxyImpl {
     .................................................................
    getSecureDnsResolverList() {
        return sendWithPromise("getSecureDnsResolverList")  //获取dns列表
    }
    getSecureDnsSetting() {
        return sendWithPromise("getSecureDnsSetting")     
    }
    isValidConfig(entry) {
        return sendWithPromise("isValidConfig", entry)  //检测dns是否正确
    }
    probeConfig(entry) {
        return sendWithPromise("probeConfig", entry)
    }
    static getInstance() {
        return instance$g || (instance$g = new PrivacyPageBrowserProxyImpl)
    }
    static setInstance(obj) {
        instance$g = obj
    }
}

2、看c++代码对应的注册函数

chrome\browser\ui\webui\settings\settings_secure_dns_handler.cc

void SecureDnsHandler::RegisterMessages() {
  web_ui()->RegisterMessageCallback(
      "getSecureDnsResolverList",
      base::BindRepeating(&SecureDnsHandler::HandleGetSecureDnsResolverList,
                          base::Unretained(this)));

  web_ui()->RegisterMessageCallback(
      "getSecureDnsSetting",
      base::BindRepeating(&SecureDnsHandler::HandleGetSecureDnsSetting,
                          base::Unretained(this)));

  web_ui()->RegisterMessageCallback(
      "isValidConfig",
      base::BindRepeating(&SecureDnsHandler::HandleIsValidConfig,
                          base::Unretained(this)));

  web_ui()->RegisterMessageCallback(
      "probeConfig", base::BindRepeating(&SecureDnsHandler::HandleProbeConfig,
                                         base::Unretained(this)));

  web_ui()->RegisterMessageCallback(
      "recordUserDropdownInteraction",
      base::BindRepeating(
          &SecureDnsHandler::HandleRecordUserDropdownInteraction,
          base::Unretained(this)));
}

1、先看 前端"getSecureDnsResolverList "dns列表对应c+++获取函数
base::Value::List SecureDnsHandler::GetSecureDnsResolverList() {
  base::Value::List resolvers;

  // Add a custom option to the front of the list
  base::Value::Dict custom;
  custom.Set("name", l10n_util::GetStringUTF8(IDS_SETTINGS_CUSTOM));
  custom.Set("value", std::string());  // Empty value means custom.
  custom.Set("policy", std::string());
  resolvers.Append(std::move(custom));
  
 //providers_ 是dns数据列表来源,定义参考下面介绍
  for (const auto* entry : providers_) {
    net::DnsOverHttpsConfig doh_config({entry->doh_server_config});
    base::Value::Dict dict;
    dict.Set("name", entry->ui_name);
    dict.Set("value", doh_config.ToString());
    dict.Set("policy", entry->privacy_policy);
    resolvers.Append(std::move(dict));
  }

  // Randomize the order of the resolvers, but keep custom in first place.
  base::RandomShuffle(std::next(resolvers.begin()), resolvers.end());

  return resolvers;
}

2、重点看providers_函数 ,其赋值和定义看代码:

chrome\browser\ui\webui\settings\settings_secure_dns_handler.h
  static net::DohProviderEntry::List GetFilteredProviders();

  net::DohProviderEntry::List providers_ = GetFilteredProviders();
  std::unique_ptr<chrome_browser_net::DnsProbeRunner> runner_;
  chrome_browser_net::DnsProbeRunner::NetworkContextGetter
      network_context_getter_ =
          base::BindRepeating(&SecureDnsHandler::GetNetworkContext,
                              base::Unretained(this));

// static
net::DohProviderEntry::List SecureDnsHandler::GetFilteredProviders() {
  return secure_dns::ProvidersForCountry(
      secure_dns::SelectEnabledProviders(net::DohProviderEntry::GetList()),
      country_codes::GetCurrentCountryID());
}

providers_ 通过GetFilteredProviders()获取列表

3、最后看列表定义net::DohProviderEntry::GetList()
net\dns\public\doh_provider_entry.cc
const DohProviderEntry::List& DohProviderEntry::GetList() {
  // See /net/docs/adding_doh_providers.md for instructions on modifying this
  // DoH provider list.
  //
  // The provider names in these entries should be kept in sync with the
  // DohProviderId histogram suffix list in
  // tools/metrics/histograms/metadata/histogram_suffixes_list.xml.
  static const base::NoDestructor<DohProviderEntry::List> providers{{
      new DohProviderEntry(
          "AlekBergNl",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderAlekBergNl, base::FEATURE_ENABLED_BY_DEFAULT),
          DohProviderIdForHistogram::kAlekBergNl,
          /*ip_strs=*/{}, /*dns_over_tls_hostnames=*/{},
          "https://dnsnl.alekberg.net/dns-query{?dns}",
          /*ui_name=*/"alekberg.net (NL)",
          /*privacy_policy=*/"https://alekberg.net/privacy",
          /*display_globally=*/false,
          /*display_countries=*/{"NL"}, LoggingLevel::kNormal),
      new DohProviderEntry(
          "CleanBrowsingAdult",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderCleanBrowsingAdult, base::FEATURE_ENABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"185.228.168.10", "185.228.169.11", "2a0d:2a00:1::1",
           "2a0d:2a00:2::1"},
          /*dns_over_tls_hostnames=*/{"adult-filter-dns.cleanbrowsing.org"},
          "https://doh.cleanbrowsing.org/doh/adult-filter{?dns}",
          /*ui_name=*/"", /*privacy_policy=*/"",
          /*display_globally=*/false, /*display_countries=*/{},
          LoggingLevel::kNormal),
      new DohProviderEntry(
          "CleanBrowsingFamily",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderCleanBrowsingFamily, base::FEATURE_ENABLED_BY_DEFAULT),
          DohProviderIdForHistogram::kCleanBrowsingFamily,
          {"185.228.168.168", "185.228.169.168",
           "2a0d:2a00:1::", "2a0d:2a00:2::"},
          /*dns_over_tls_hostnames=*/{"family-filter-dns.cleanbrowsing.org"},
          "https://doh.cleanbrowsing.org/doh/family-filter{?dns}",
          /*ui_name=*/"CleanBrowsing (Family Filter)",
          /*privacy_policy=*/"https://cleanbrowsing.org/privacy",
          /*display_globally=*/true, /*display_countries=*/{},
          LoggingLevel::kNormal),
      new DohProviderEntry(
          "CleanBrowsingSecure",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderCleanBrowsingSecure, base::FEATURE_ENABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"185.228.168.9", "185.228.169.9", "2a0d:2a00:1::2",
           "2a0d:2a00:2::2"},
          /*dns_over_tls_hostnames=*/{"security-filter-dns.cleanbrowsing.org"},
          "https://doh.cleanbrowsing.org/doh/security-filter{?dns}",
          /*ui_name=*/"", /*privacy_policy=*/"", /*display_globally=*/false,
          /*display_countries=*/{}, LoggingLevel::kNormal),
      new DohProviderEntry(
          "Cloudflare",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderCloudflare, base::FEATURE_ENABLED_BY_DEFAULT),
          DohProviderIdForHistogram::kCloudflare,
          {"1.1.1.1", "1.0.0.1", "2606:4700:4700::1111",
           "2606:4700:4700::1001"},
          /*dns_over_tls_hostnames=*/
          {"one.one.one.one", "1dot1dot1dot1.cloudflare-dns.com"},
          "https://chrome.cloudflare-dns.com/dns-query",
          /*ui_name=*/"Cloudflare (1.1.1.1)",
          "https://developers.cloudflare.com/1.1.1.1/privacy/"
          /*privacy_policy=*/"public-dns-resolver/",
          /*display_globally=*/true, /*display_countries=*/{},
          LoggingLevel::kExtra),
      new DohProviderEntry(
          "Comcast",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderComcast, base::FEATURE_ENABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"75.75.75.75", "75.75.76.76", "2001:558:feed::1",
           "2001:558:feed::2"},
          /*dns_over_tls_hostnames=*/{"dot.xfinity.com"},
          "https://doh.xfinity.com/dns-query{?dns}", /*ui_name=*/"",
          /*privacy_policy*/ "", /*display_globally=*/false,
          /*display_countries=*/{}, LoggingLevel::kExtra),
      new DohProviderEntry(
          "Cox",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderCox, base::FEATURE_DISABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"68.105.28.11", "68.105.28.12", "2001:578:3f::30"},
          /*dns_over_tls_hostnames=*/{"dot.cox.net"},
          "https://doh.cox.net/dns-query",
          /*ui_name=*/"", /*privacy_policy=*/"",
          /*display_globally=*/false, /*display_countries=*/{},
          LoggingLevel::kNormal),
      new DohProviderEntry(
          "Cznic",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderCznic, base::FEATURE_ENABLED_BY_DEFAULT),
          DohProviderIdForHistogram::kCznic,
          {"185.43.135.1", "193.17.47.1", "2001:148f:fffe::1",
           "2001:148f:ffff::1"},
          /*dns_over_tls_hostnames=*/{"odvr.nic.cz"}, "https://odvr.nic.cz/doh",
          /*ui_name=*/"CZ.NIC ODVR",
          /*privacy_policy=*/"https://www.nic.cz/odvr/",
          /*display_globally=*/false, /*display_countries=*/{"CZ"},
          LoggingLevel::kNormal),
      new DohProviderEntry(
          "Dnssb",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderDnssb, base::FEATURE_ENABLED_BY_DEFAULT),
          DohProviderIdForHistogram::kDnsSb,
          {"185.222.222.222", "45.11.45.11", "2a09::", "2a11::"},
          /*dns_over_tls_hostnames=*/{"dns.sb"},
          "https://doh.dns.sb/dns-query{?dns}", /*ui_name=*/"DNS.SB",
          /*privacy_policy=*/"https://dns.sb/privacy/",
          /*display_globally=*/false, /*display_countries=*/{"EE", "DE"},
          LoggingLevel::kNormal),
      new DohProviderEntry(
          "Google",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderGoogle, base::FEATURE_ENABLED_BY_DEFAULT),
          DohProviderIdForHistogram::kGoogle,
          {"8.8.8.8", "8.8.4.4", "2001:4860:4860::8888",
           "2001:4860:4860::8844"},
          /*dns_over_tls_hostnames=*/
          {"dns.google", "dns.google.com", "8888.google"},
          "https://dns.google/dns-query{?dns}",
          /*ui_name=*/"Google (Public DNS)",
          "https://developers.google.com/speed/public-dns/"
          /*privacy_policy=*/"privacy",
          /*display_globally=*/true, /*display_countries=*/{},
          LoggingLevel::kExtra),
      new DohProviderEntry(
          "GoogleDns64",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderGoogleDns64, base::FEATURE_ENABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"2001:4860:4860::64", "2001:4860:4860::6464"},
          /*dns_over_tls_hostnames=*/{"dns64.dns.google"},
          "https://dns64.dns.google/dns-query{?dns}",
          /*ui_name=*/"", /*privacy_policy=*/"",
          /*display_globally=*/false,
          /*display_countries=*/{}, LoggingLevel::kNormal),
      new DohProviderEntry(
          "Iij",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderIij, base::FEATURE_ENABLED_BY_DEFAULT),
          DohProviderIdForHistogram::kIij, /*ip_strs=*/{},
          /*dns_over_tls_hostnames=*/{}, "https://public.dns.iij.jp/dns-query",
          /*ui_name=*/"IIJ (Public DNS)",
          /*privacy_policy=*/"https://public.dns.iij.jp/",
          /*display_globally=*/false, /*display_countries=*/{"JP"},
          LoggingLevel::kNormal),
      new DohProviderEntry(
          "NextDns",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderNextDns, base::FEATURE_ENABLED_BY_DEFAULT),
          DohProviderIdForHistogram::kNextDns, /*ip_strs=*/{},
          /*dns_over_tls_hostnames=*/{}, "https://chromium.dns.nextdns.io",
          /*ui_name=*/"NextDNS",
          /*privacy_policy=*/"https://nextdns.io/privacy",
          /*display_globally=*/false, /*display_countries=*/{"US"},
          LoggingLevel::kNormal),
      new DohProviderEntry(
          "OpenDNS",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderOpenDNS, base::FEATURE_ENABLED_BY_DEFAULT),
          DohProviderIdForHistogram::kOpenDns,
          {"208.67.222.222", "208.67.220.220", "2620:119:35::35",
           "2620:119:53::53"},
          /*dns_over_tls_hostnames=*/{},
          "https://doh.opendns.com/dns-query{?dns}", /*ui_name=*/"OpenDNS",
          "https://www.cisco.com/c/en/us/about/legal/"
          /*privacy_policy=*/"privacy-full.html",
          /*display_globally=*/true, /*display_countries=*/{},
          LoggingLevel::kNormal),
      new DohProviderEntry(
          "OpenDNSFamily",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderOpenDNSFamily, base::FEATURE_ENABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"208.67.222.123", "208.67.220.123", "2620:119:35::123",
           "2620:119:53::123"},
          /*dns_over_tls_hostnames=*/{},
          "https://doh.familyshield.opendns.com/dns-query{?dns}",
          /*ui_name=*/"", /*privacy_policy=*/"", /*display_globally=*/false,
          /*display_countries=*/{}, LoggingLevel::kNormal),
      new DohProviderEntry(
          "Quad9Cdn",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderQuad9Cdn, base::FEATURE_ENABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"9.9.9.11", "149.112.112.11", "2620:fe::11", "2620:fe::fe:11"},
          /*dns_over_tls_hostnames=*/{"dns11.quad9.net"},
          "https://dns11.quad9.net/dns-query", /*ui_name=*/"",
          /*privacy_policy=*/"", /*display_globally=*/false,
          /*display_countries=*/{}, LoggingLevel::kNormal),
      new DohProviderEntry(
          "Quad9Insecure",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderQuad9Insecure, base::FEATURE_ENABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"9.9.9.10", "149.112.112.10", "2620:fe::10", "2620:fe::fe:10"},
          /*dns_over_tls_hostnames=*/{"dns10.quad9.net"},
          "https://dns10.quad9.net/dns-query", /*ui_name=*/"",
          /*privacy_policy=*/"", /*display_globally=*/false,
          /*display_countries=*/{}, LoggingLevel::kNormal),
      new DohProviderEntry(
          "Quad9Secure",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderQuad9Secure, base::FEATURE_DISABLED_BY_DEFAULT),
          DohProviderIdForHistogram::kQuad9Secure,
          {"9.9.9.9", "149.112.112.112", "2620:fe::fe", "2620:fe::9"},
          /*dns_over_tls_hostnames=*/{"dns.quad9.net", "dns9.quad9.net"},
          "https://dns.quad9.net/dns-query", /*ui_name=*/"Quad9 (9.9.9.9)",
          /*privacy_policy=*/"https://www.quad9.net/home/privacy/",
          /*display_globally=*/true, /*display_countries=*/{},
          LoggingLevel::kExtra),
      new DohProviderEntry(
          "Quickline",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderQuickline, base::FEATURE_ENABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"212.60.61.246", "212.60.63.246", "2001:1a88:10:ffff::1",
           "2001:1a88:10:ffff::2"},
          /*dns_over_tls_hostnames=*/{"dot.quickline.ch"},
          "https://doh.quickline.ch/dns-query{?dns}",
          /*ui_name=*/"", /*privacy_policy=*/"",
          /*display_globally=*/false,
          /*display_countries=*/{}, LoggingLevel::kNormal),
      new DohProviderEntry(
          "Spectrum1",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderSpectrum1, base::FEATURE_ENABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"209.18.47.61", "209.18.47.62", "2001:1998:0f00:0001::1",
           "2001:1998:0f00:0002::1"},
          /*dns_over_tls_hostnames=*/{},
          "https://doh-01.spectrum.com/dns-query{?dns}",
          /*ui_name=*/"", /*privacy_policy=*/"",
          /*display_globally=*/false,
          /*display_countries=*/{}, LoggingLevel::kNormal),
      new DohProviderEntry(
          "Spectrum2",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderSpectrum2, base::FEATURE_ENABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"209.18.47.61", "209.18.47.62", "2001:1998:0f00:0001::1",
           "2001:1998:0f00:0002::1"},
          /*dns_over_tls_hostnames=*/{},
          "https://doh-02.spectrum.com/dns-query{?dns}",
          /*ui_name=*/"", /*privacy_policy=*/"",
          /*display_globally=*/false,
          /*display_countries=*/{}, LoggingLevel::kNormal),
      new DohProviderEntry(
          "Switch",
          MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
              DohProviderSwitch, base::FEATURE_DISABLED_BY_DEFAULT),
          /*provider_id_for_histogram=*/absl::nullopt,
          {"130.59.31.251", "130.59.31.248", "2001:620:0:ff::2",
           "2001:620:0:ff::3"},
          /*dns_over_tls_hostnames=*/{"dns.switch.ch"},
          "https://dns.switch.ch/dns-query", /*ui_name=*/"",
          /*privacy_policy=*/"", /*display_globally=*/false,
          /*display_countries=*/{}, LoggingLevel::kNormal),
  }};
  return *providers;
}

    
三、至此数据来源分析完毕,如果想要用自己的dns只需要在
net\dns\public\doh_provider_entry.cc
const DohProviderEntry::List& DohProviderEntry::GetList() 函数里面按照此格式追加即可。
不同版本内核的浏览器有所差异。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2187043.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

25货拉拉校园招聘面试经验 面试最常见问题总结

货拉拉校园招聘面试经验 目录 【面试经历】 问题+详细答案 面试全流程 【面试经历】 发面经,攒人品。 项目问题: 1.AOP日志落库到数据库,为什么不用一些现成的方案? 2.邀请链接的id怎么用redis生成的? 3.乐观锁保证了奖励的正确发放,请你说说乐观锁的原理。 4.奖…

TCN模型实现电力数据预测

关于深度实战社区 我们是一个深度学习领域的独立工作室。团队成员有&#xff1a;中科大硕士、纽约大学硕士、浙江大学硕士、华东理工博士等&#xff0c;曾在腾讯、百度、德勤等担任算法工程师/产品经理。全网20多万粉丝&#xff0c;拥有2篇国家级人工智能发明专利。 社区特色&a…

AI少女/HS2甜心选择2 仿天刀人物卡全合集打包

内含AI少女/甜心选择2 仿天刀角色卡全合集打包共21张 下载地址&#xff1a;https://www.51888w.com/408.html 部分演示图&#xff1a;

python全栈学习记录(二十一)类的继承、派生、组合

类的继承、派生、组合 文章目录 类的继承、派生、组合一、类的继承二、派生三、组合 一、类的继承 继承是一种新建类的方式&#xff0c;新建的类称为子类&#xff0c;被继承的类称为父类。 继承的特性是&#xff1a;子类会遗传父类的属性&#xff08;继承是类与类之间的关系&a…

基于STM32的数字温度传感器设计与实现

引言 STM32 是由意法半导体&#xff08;STMicroelectronics&#xff09;开发的基于 ARM Cortex-M 内核的微控制器系列&#xff0c;以其强大的处理能力、丰富的外设接口和低功耗著称&#xff0c;广泛应用于嵌入式系统设计中。在这篇文章中&#xff0c;我们将介绍如何基于 STM32…

C++《string》

在之前的C语言学习当中我们已经了解了一系列的字符以及字符串函数&#xff0c;虽然这些函数也能实现对字符串进行求长度、拷贝、追加等操作&#xff0c;但是C语言当中的这些函数是与字符串分离的&#xff0c;并且最主要的是在使用这些函数时原字符串的底层空间是需要我们自己来…

微知-Intel芯片中的QPI是什么?本质是什么?以及其他几个高速总线的速率问题(快速通道互联,CPU之间互联总线)

基础信息 CPU与CPU之间通过QPI总线进行通信&#xff0c;类似CPU与PCI-E设备通过PCIE总线进行通信。 The Intel QuickPath Interconnect (QPI)&#xff1a;快速通道互联&#xff0c;快路径内部互联总线。是Inter-connect&#xff0c;内部互联的。是英特尔开发的一种高速点对点…

SpringBoot精华:打造高效美容院管理系统

第一章 绪论 1.1 选题背景 如今的信息时代&#xff0c;对信息的共享性&#xff0c;信息的流通性有着较高要求&#xff0c;尽管身边每时每刻都在产生大量信息&#xff0c;这些信息也都会在短时间内得到处理&#xff0c;并迅速传播。因为很多时候&#xff0c;管理层决策需要大量信…

BiLSTM模型实现电力数据预测

基础模型见&#xff1a;A020-LSTM模型实现电力数据预测 1. 引言 时间序列预测在电力系统管理、负荷预测和能源优化等领域具有重要意义。传统的单向长短期记忆网络&#xff08;LSTM&#xff09;因其在处理时间序列数据中的优势&#xff0c;广泛应用于此类任务。然而&#xff0…

用友NC service接口信息泄露漏洞

漏洞描述 用友NC service接口信息泄露漏洞&#xff0c;攻击者可通过构造恶意链接获取所有接口链接 公网上大部分服务器都没有修复此漏洞&#xff0c;可刷SRC 用友nc有个接口可以获取数据库账户密码&#xff0c;不过是老版本了 漏洞复现 app"用友-UFIDA-NC" POC …

哪家宠物空气净化器可以高效去除浮毛?希喂、IAM、有哈怎么样

在现代养宠家庭中&#xff0c;随着生活节奏的加快&#xff0c;清理浮毛也是很多家庭周末必须要做的事情。但是如何选择一款吸毛好、还不增加清理负担的宠物空气净化器&#xff0c;在寸土寸金的租房里为全家老小的健康生活保障&#xff1f;又如何通过强大的吸毛、除臭技术和除菌…

【学习笔记】手写一个简单的 Spring IOC

目录 一、什么是 Spring IOC&#xff1f; 二、IOC 的作用 1. IOC 怎么知道要创建哪些对象呢&#xff1f; 2. 创建出来的对象放在哪儿&#xff1f; 3. 创建出来的对象如果有属性&#xff0c;如何给属性赋值&#xff1f; 三、实现步骤 1. 创建自定义注解 2. 创建 IOC 容器…

IO模型介绍

一、理解IO 网络通信的本质就是进程间通信&#xff0c;进程间通信本质就是IO TCP中的IO接口&#xff1a;read / write / send / recv&#xff0c;本质都是&#xff1a;等 拷贝 所以IO的本质就是&#xff1a;等 拷贝 那么如何高效的IO&#xff1f; 减少“等”在单位时间的…

在VS code 中部署C#和avalonia开发环境

要在 Mac 的 VS Code 中配置 C# 和 Avalonia 的开发环境&#xff0c;您可以按照以下步骤进行&#xff1a; 1. 安装 .NET SDK 下载 .NET SDK&#xff1a; 访问 .NET 下载页面。选择适用于 macOS 的最新稳定版本的 .NET SDK&#xff0c;并下载安装程序。安装 .NET SDK&#xff1…

PADS自动导出Gerber文件 —— 6层板

在出GERBER文件之前要给PCB文件铺完铜并且检查连接性和安全间距无错误。进入CAM中之后点自动定义。如果电气层不需要用到2D线&#xff0c;保险起见在电气层中把2D线和文本去掉&#xff08;在DRC检查时2D线不会报错&#xff0c;文本是会报错的&#xff09;&#xff0c;因为有些时…

【JAVA开源】基于Vue和SpringBoot的校园资料分享平台

本文项目编号 T 059 &#xff0c;文末自助获取源码 \color{red}{T059&#xff0c;文末自助获取源码} T059&#xff0c;文末自助获取源码 目录 一、系统介绍二、演示录屏三、启动教程四、功能截图五、文案资料5.1 选题背景5.2 国内外研究现状5.3 可行性分析 六、核心代码6.1 查…

(功能测试)熟悉web项目及环境 测试流程

1.环境&#xff1f;有没有考虑过什么是环境&#xff1f; web网站为什么能打开&#xff1f; &#xff08;是因为他的服务器已经在运行了&#xff0c;网站服务器相关环境已部署及运行&#xff09; 所以什么是环境&#xff1f; 环境&#xff1a;就是项目运行所需要的软件及硬件组合…

php与python建站的区别有哪些

php与Python建站的区别&#xff1a; 1、语言层面Python的特性比php好&#xff0c;更加规范。 2、Python的性能比php高。 3、有只需要启动服务的时候执行一次的代码&#xff0c;在php里每个请求都会被执行一次&#xff0c;Python不需要。虽然php可以通过缓存缩短这方面的差距…

CVPR论文《DETRs Beat YOLOs on Real-time Object Detection》读后思维导图

下面欣赏一下论文中的图和表&#xff1a; 1、与YOLOs的性能对比图 2、不同置信度阈值下的框数 3、IoU阈值和置信度阈值对准确性和NMS执行时间的影响 4、混合编码器不同变体 5、模型概述。将骨干网后三个阶段的特征输入到编码器中。高效混合编码器通过基于注意力的尺度内特征交…

Linux网络基础:HTTPS 网络传输协议

HTTPS HTTPS 网络传输协议加密常见的加密方式&#xff08;对称/非对称加密&#xff09;数据摘要、数字签名HTTPS 加密过程探索的方案只使用对称加密&#xff08;效率低下、不安全&#xff09;只使用非对称加密&#xff08;不靠谱、不安全&#xff09;双方都使用非对称加密&…