3

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

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

编辑

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

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

1 回答 1

4

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

我对此没有官方确认,但这似乎很合乎逻辑。

于 2018-11-08T17:18:07.587 回答