How Do I Configure a Source Server to Access HUAWEI CLOUD Through a Proxy?
Scenarios
Each source server must continuously communicate with SMS over the Internet. If a source server cannot access HUAWEI CLOUD over the Internet, you can configure a proxy for the source server.
The IP address and port number in this section are used as examples only.
Preparations
- Prepare a CentOS server that will serve as a proxy server. In this section, CentOS 7.2 64-bit is used as an example.
The proxy server must be able to communicate with the source server through the intranet.
- Obtain the Squid installation package.
Procedure
- Install and configure Squid on the CentOS server.
- Install Squid.
- Edit the squid.conf file as follows:

http_port 3128 cache_mem 64 MB maximum_object_size 4 MB cache_dir ufs /var/spool/squid 100 16 256 access_log /var/log/squid/access.log acl localnet src 192.168.0.0/16 http_access allow localnet http_access deny all
http_port indicates the port specified for Squid. acl localnet src indicates the intranet IP address of the source server that needs to access the Internet using the proxy server. You can also set acl localnet src to 0.0.0.0/0 to allow access from all servers.
- Initialize Squid.
- Start Squid and set it to automatically start upon system boot.
- Configure the source server to access the Internet through the proxy server.
- Linux
Create a /etc/profile.d/proxy.sh file, edit the file, and then run the source /etc/profile command according to the following figure:

Set export https_proxy to the intranet IP address and port of your proxy server. 192.168.10.72:3128 indicates that the source server will access the Internet over port 3128 of the proxy server with IP address of 192.168.10.72.
- Windows
Open a browser, for example, Internet Explorer. Choose Tools > Internet Options > Connections > LAN Settings. In the Proxy Server area, set the parameters as follows:

Address and Port indicate the intranet IP address and port of the proxy server, respectively. In this example, the source server will access the Internet over port 3128 of the proxy server with intranet IP address of 192.168.10.72.
- Linux
- Perform the following operations on the source server to register it with SMS using the SMS Agent through the proxy.
- Linux
- Run the curl -O https://sms-agent-2-0-cn-north-1.obs.cn-north-1.myhuaweicloud.com/SMS-Agent.tar.gz command to download the SMS Agent installation package.
Decompress the installation package.

- Go to the SMS-Agent/agent/config directory and modify the auth.cfg file.


proxy_addr indicates the intranet IP address of the proxy server that the source server uses to access SMS. proxy_port indicates the proxy port over which the source server accesses SMS.
- Enter the AK and SK of the HUAWEI CLOUD account you will use for migration as prompted.
When the message successfully! is displayed, the SMS-Agent is started successfully and starts reporting source server information to SMS.

- Run the curl -O https://sms-agent-2-0-cn-north-1.obs.cn-north-1.myhuaweicloud.com/SMS-Agent.tar.gz command to download the SMS Agent installation package.
- Windows
- Download and install the Agent on the source server.
- For Windows Server 2019/2016/2012 or Windows 10/8.1, install SMS-Agent-Py3.exe.
- For Windows Server 2008 or Windows 7, install SMS-Agent-Py2.exe.
For details, see Installing the Windows Agent.
- After the installation is complete, in the displayed SMS-Agent GUI, enter the AK and SK of the HUAWEI CLOUD account you will use for migration, and click Start.
- If you do not need to use an HTTPS proxy, select Direct connection.
- If you need to use an HTTPS proxy, select Use proxy and enter the IP address, port number, username, and password of the proxy server. Ignore Proxy user name and Password because no username or password is configured for the proxy server in this example.

proxy_addr indicates the intranet IP address of the proxy server that the source server uses to access SMS.
When the message Upload success. Waiting for the SMS instruction is displayed, the Agent has been started. You need to log in to the SMS console and perform subsequent operations.
After the Windows source server is migrated, you are advised to reset the browser proxy settings to avoid its effects on the source server.
- Download and install the Agent on the source server.
- Linux



Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.