azure-devops - Azure devops 托管代理可疑主机文件

标签 azure-devops azure-pipelines hosts azure-devops-hosted-agent

这可能是一个奇怪的问题,但请听我说。我正在使用 Azure Devops Hosted Agent 进行持续部署。在发布期间,我有一项任务是在托管代理上的主机文件中添加一行。以前的主机文件看起来像这样:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost 
xx.xxx.x.xx mydomain.net

正如您在 powershell 中看到的那样,我将 mydomain.net IP 添加到主机文件中。这在很长一段时间内都运行良好。

最近我的发布开始失败,因为它错误地更新了主机文件。我检查了托管代理上的主机文件,现在它看起来像这样:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

127.0.0.1 aion.f2pool.com
127.0.0.1 asia.cryptonight-hub.miningpoolhub.com
127.0.0.1 asia.equihash-hub.miningpoolhub.com
127.0.0.1 asia.ethash-hub.miningpoolhub.com
127.0.0.1 asia.lyra2z-hub.miningpoolhub.com
127.0.0.1 ca.minexmr.com
127.0.0.1 ca.stratum.slushpool.com
127.0.0.1 cn.stratum.slushpool.com
127.0.0.1 cn02.stratum.slushpool.com
127.0.0.1 cn03.stratum.slushpool.com
127.0.0.1 dash.f2pool.com
127.0.0.1 dcr.f2pool.com
127.0.0.1 de.kano.is
127.0.0.1 de.minexmr.com
127.0.0.1 etc.f2pool.com
127.0.0.1 eth.f2pool.com
127.0.0.1 eu.stratum.slushpool.com
127.0.0.1 europe.cryptonight-hub.miningpoolhub.com
127.0.0.1 europe.equihash-hub.miningpoolhub.com
127.0.0.1 europe.ethash-hub.miningpoolhub.com
127.0.0.1 europe.lyra2z-hub.miningpoolhub.com
127.0.0.1 fr.minexmr.com
127.0.0.1 gulf.moneroocean.stream
127.0.0.1 hub.miningpoolhub.com
127.0.0.1 jp.kano.is
127.0.0.1 jp.stratum.slushpool.com
127.0.0.1 mmmoneropool.com
127.0.0.1 nya.kano.is
127.0.0.1 pool.minexmr.com
127.0.0.1 pool.supportxmr.com
127.0.0.1 sc.f2pool.com
127.0.0.1 sg.kano.is
127.0.0.1 sg.minexmr.com
127.0.0.1 sg.stratum.slushpool.com
127.0.0.1 stratum.antpool.com
127.0.0.1 stratum.f2pool.com
127.0.0.1 stratum.kano.is
127.0.0.1 stratum.slushpool.com
127.0.0.1 uk.kano.is
127.0.0.1 us-east.cryptonight-hub.miningpoolhub.com
127.0.0.1 us-east.equihash-hub.miningpoolhub.com
127.0.0.1 us-east.ethash-hub.miningpoolhub.com
127.0.0.1 us-east.lyra2z-hub.miningpoolhub.com
127.0.0.1 us-east.stratum.slushpool.com
127.0.0.1 xmr-classic.f2pool.com
127.0.0.1 xmr.f2pool.com
127.0.0.1 xmr.prohash.net
127.0.0.1 xmrpool.eu
127.0.0.1 xzc.f2pool.com
127.0.0.1 zec.f2pool.comxx.xxx.x.xx mydomain.net

尽管我可以通过向我的 powershell 脚本添加新的行分隔符来解决这个问题,但我更感兴趣的是那些添加到主机文件的地址是什么?我的印象是,当我选择托管代理时,Azure 会为我提供新机器,对吗?谁可以给我解释一下这个?或者这是托管代理防止某些加密挖矿的新方法?

编辑:

这是我正在使用的 powershell 脚本:

$file = "$env:windir\System32\drivers\etc\hosts"
"xx.xxx.x.xx mydomain.net" | Add-Content -PassThru $file
Get-Content -Path $file

最佳答案

Microsoft 最近取消了对托管代理的按小时付费限制。由于有无限的免费托管代理分钟数,他们必须采取一些措施来防止他们的毛钱被加密挖掘。

我没有官方证实这一点,但它似乎很合乎逻辑。

关于azure-devops - Azure devops 托管代理可疑主机文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53205234/

相关文章:

azure - 引用ARM模板中的VSTS构建/发布变量

azure - Katalon - Azure DevOps 管道

windows - 为了可读性,我应该在 Notepad++ 中使用什么语言选项和我的 Windows 主机文件?

windows - 编辑特定 URL 的 HOSTS 文件?

Azure Artifacts - 下载特定版本的 Maven 工件

c# - VS 无法找到该服务器上的工作区

Azure Devops - 如何强制在新分支上触发 CI,或使用发布分支?

angular - 缩短 Azure Devops 中 Angular 8 应用程序的生产构建时间

azure - 持续部署触发器中 `Build branch filters`的用途是什么?

hadoop - ssh:无法解析主机名。名称或服务未知