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

Azure devops Azure devops托管代理可疑主机文件,azure-devops,azure-pipelines,hosts,azure-devops-hosted-agent,Azure Devops,Azure Pipelines,Hosts,Azure Devops Hosted Agent,这可能是个奇怪的问题,但请坚持我的观点。我正在使用Azure Devops托管代理进行持续部署。在发布过程中,我有一个任务,在托管代理上的hosts文件中添加一行。以前,hosts文件如下所示: # 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 I

这可能是个奇怪的问题,但请坚持我的观点。我正在使用Azure Devops托管代理进行持续部署。在发布过程中,我有一个任务,在托管代理上的hosts文件中添加一行。以前,hosts文件如下所示:

# 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
# 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中看到的,我正在将mydomain.net IP添加到主机文件中。这在很长一段时间内都运作良好

最近我的版本开始失败,因为它错误地更新了主机文件。我已在hosted agent上检查了hosts文件,现在它看起来如下所示:

# 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
# 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脚本中添加新行分隔符来解决这个问题,但我更感兴趣的是,这些地址添加到了hosts文件中是什么?我的印象是,当我选择托管代理时,Azure为我旋转了一台新机器,对吗?有人能给我解释一下吗?或者这是托管代理阻止某些加密挖掘的一种新方法

编辑

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

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

微软最近取消了托管代理按小时付费的限制。由于有无限的免费托管代理分钟数,他们必须采取一些措施防止在他们的一角硬币上进行加密挖掘


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

@SteppingRazor我没有说这是一个很好的解决方案。再说一次,这完全是我的假设,但我假设这是一个权宜之计,而一个更强大的,永久的解决方案正在实施。