[不花钱站长]:从免费域名开始[0元] Oracle永久免费VPS[0元] VPS环境搭建免费脚本[0元] 秒变大盘挂载免费网盘[0元] 小白免费采集器1天500W[0元] CF免费DNS+CDN服务[0元]
[零基础网赚]:撸本站免费源码[0元] 网站强引免费蜘蛛法[0元] 图片视频文件免费存储[0元] 外链轻松发布免费友链[0元] 入坑免费教程学习源代码[0元] 网上百种+赚钱联盟推荐[?元]

↑↑VPS推荐网 WWW.VPS.COM.IN 稳定 便宜 免备案↑↑


转载 高品质美国CN2自动切换机房脚本/利用高品质美国CN2API实现自动切换机房

美国VPS[主机]来源:VPS推荐网点击:856
【性价之王】【线路之王】【价格之王】【配置之王】
【免费之王】【香港首推】【梯子之王】【独服之王】
转载 高品质美国CN2自动切换机房脚本/利用高品质美国CN2API实现自动切换机房

高品质美国CN2是来自美国的知名VPS销售商,是一个低价格、高性能融合一体的商家,至少蜗牛是这么认为了,蜗牛手头有很多VPS,而且自己购买的高品质美国CN2VPS是使用评率最高的。今年双使用高品质美国CN2推出了给力的2核2G内存促销方案,CN2 GT线路,年付只需29.88美元,性价比超高,但是默认分配的是DC3(洛杉矶QN机房),有些网友更希望使用DC8(洛杉矶C3机房),不过很多朋友应该在控制面板操作切换到DC8机房提示“Region is full. Please try again in a few hours.”错误,这个提示表示的是机房已满,稍后再操作,蜗牛其实之前在高品质美国CN2一键自动申请迁移到DC8机房(CN2 GT线路)脚本分享过一个自动切换机房的脚本,今天在这里再为大家分享一个由@萌咖大佬制作的利用高品质美国CN2API实现自动切换机房脚本,原理和之前蜗牛提到的脚本是一致的。

一、脚本下载wget --no-check-certificate -qO BWH.sh \'https://moeclub.org/attachment/LinuxShell/BWH.sh\' && chmod a+x BWH.sh二、运行命令#前台运行bash BWH.sh#后台运行nohup bash BWH.sh >/dev/null 2>&1 &三、脚本设置

这一步很关键,下载脚本之后,我们需要对脚本进行编辑,修改下面部分的关键数据。

veid=\'1234560\'; # VEIDapi_key=\'private_xxxxxxxxxxxxxxxxx\'; # API KEYToLocation=\'USCA_8\'; # 目标机房代码.Timeout=\'150\'; # API频率有限制,单位秒.每150秒运行一次.(不建议过低,否则面板报错.)

至于如何修改我们可以通过下面命令来修改BWH.sh,或者直接把此文件从服务器下载下来直接用记事本修改后保存再上传到服务器。

vim BWH.sh

1、通过控制面板的API获取veid、api_key信息,如下图,报获取的信息填写到’1234560’、’private_xxxxxxxxxxxxxxxxx’引号内的内容。

2、获取ToLocation目标机房代码信息。首先同样通过控制面板进入到手动切换机房页面,可以入下图查看到需要的机房代码。

四、脚本代码预览#!/bin/bash veid=\'1234560\';api_key=\'private_xxxxxxxxxxxxxxxxx\';ToLocation=\'USCA_8\';Timeout=\'150\'; # START[[ -n \"$veid\" ]] || exit 1[[ -n \"$api_key\" ]] || exit 1[[ -n \"$ToLocation\" ]] || exit 1[[ -n \"$Timeout\" ]] || exit 1 CurrentLocation=\'\';Token=\"?veid=${veid}&api_key=${api_key}\";API_URL=\"https://api.64clouds.com/v1/\";while [[ \"$CurrentLocation\" != \"$ToLocation\" ]]; do CurrentLocation=$(wget --no-check-certificate -qO- \"${API_URL}migrate/getLocations${Token}\" |grep -o \'\"currentLocation\":\"[^\"]*\"\' |cut -d\'\"\' -f4) echo \"$(date +\"[%Y/%m/%d %H:%M:%S]\") ${CurrentLocation}\"; if [ -n \"$CurrentLocation\" -a \"$CurrentLocation\" != \"$ToLocation\" ]; then echo -n \"${ToLocation}: \" wget --no-check-certificate -qO- \"${API_URL}migrate/start${Token}&location=${ToLocation}\" |grep -o \'\"message\":\"[^\"]*\"\' |cut -d\'\"\' -f4 else break; fi sleep ${Timeout};done

脚本出自:https://moeclub.org/2018/11/12/680/?v=791


[bandwagonhost]历史优惠活动内容
  • 搬瓦工 BandwagonHost介绍–性价比高,口碑好,CN2 GIA线路
  • 搬瓦工 BandwagonHost介绍–性价比高,口碑好,CN2 GIA线路
  • BandwagonHost-512M内存年付10刀再次来袭
  • BandwagonHost-512M内存年付10刀再次来袭
  • bandwagonhost-半价再次来袭/G口
  • bandwagonhost-半价再次来袭/G口
  • bandwagonhost/搬瓦工vps-512M内存VPS年付9.9刀(5GSSD版非3G
  • bandwagonhost/搬瓦工vps-512M内存VPS年付9.9刀(5GSSD版非3G
  • bandwagonhost/搬瓦工vps-512M内存VPS年付9.9刀(5GSSD版非3G
  • bandwagonhost/搬瓦工vps-512M内存VPS年付9.9刀(5GSSD版非3G
  • bandwagonhost/搬瓦工vps-终身5折优惠/G口/凤凰城
  • bandwagonhost/搬瓦工vps-凤凰城高速VPS/24小时5折促销
  • bandwagonhost/搬瓦工vps-凤凰城高速VPS/24小时5折促销
  • bandwagonhost-512m内存/5g硬盘/500g流量/年付9.99美元
  • bandwagonhost/搬瓦工vps简单测评-(512m内存/年付9.9刀)!
  • bandwagonhost/搬瓦工vps简单测评-(512m内存/年付9.9刀)!
  • bandwagonhost/搬瓦工vps-5折促销:1g内存/50g硬盘/G口/凤凰城
  • bandwagonhost/搬瓦工vps-5折促销:1g内存/50g硬盘/G口/凤凰城
  • bandwagonhost/搬瓦工vps-5折促销:1g内存/50g硬盘/G口/凤凰城
  • bandwagonhost/搬瓦工vps-5折促销:1g内存/50g硬盘/G口/凤凰城
  • bandwagonhost/搬瓦工VPS-改版(大硬盘) 优惠促销
  • bandwagonhost/搬瓦工-13.99$年/256m内存/10g硬盘/500g流量/
  • bandwagonhost/搬瓦工-年付3.99$/超低价VPS/小内存/SSD硬盘
  • bandwagonhost/搬瓦工vps-128m内存VPS简单测评
  • 神器来袭:bandwagonhost/搬瓦工vps-512m内存VPS年付9.99刀
  • 神器来袭:bandwagonhost/搬瓦工vps-512m内存VPS年付9.99刀
  • 神器来袭:bandwagonhost/搬瓦工vps-512m内存VPS年付9.99刀
  • bandwagonhost/搬瓦工vps-特价64m/96m/128m/512m全部上货
  • bandwagonhost/搬瓦工VPS-7美元/4g内存/30gSSD/2T流量
  • bandwagonhost-4G内存款VPS简单测评
  • bandwagonhost/搬瓦工VPS-7美元/4g内存/30gSSD/2T流量
  • bandwagonhost-4G内存款VPS简单测评
  • 全面补货(5.25):bandwagonhost/搬瓦工vps-128M至4g内存VPS-低
  • bandwagonhost-新增洛杉矶机房,VPS年付3.99美元,4机房
  • bandwagonhost-512M内存洛杉矶机房VPS测试
  • 干货:bandwagonhost/搬瓦工VPS-$18.99年/1g内存/20gSSD/2T
  • #消息→bandwagonhost,支付宝/信用卡/PayPal付款(VPS年付4美元,起步
  • 推荐→bandwagonhost-最新特价版VPS(2015/8)/资源加大/支付宝
  • bandwagonhost-全新机房/FMT/$19.99年付/512M内存/10gSSD/
  • bandwagonhost-费利蒙VPS简单测试,刚上架的新母鸡
  • bandwagonhost-补货/512m内存VPS年付12美元/支付宝
  • bandwagonhost-补货/512m内存VPS年付12美元/支付宝
  • bandwagonhost 最新中国直连VPS简单测评
  • bandwagonhost-全新中国直连路由/VPS/512M内存年付20美元/支付宝付款
  • 好评→bandwagonhost-便宜VPS,稳定VPS,8个机房,支持支付宝
  • #搬瓦工VPS# bandwagonhost 新增洛杉矶MC机房/纽约机房+测评
  • #搬瓦工VPS# bandwagonhost-第8个机房正式上线
  • #重磅消息# bandwagonhost(搬瓦工)上线KVM虚拟VPS/亚洲优化VPS
  • 搬瓦工KVM VPS 测评/bandwagonhost KVM VPS 测评/洛杉矶/亚洲优
  • bandwagonhost kvm vps 测评→Fremont(费利蒙)机房
  • 推荐→搬瓦工/bandwagonhost→KVM VPS 512M内存,年付19.99美元+
  • bandwagonhost搬瓦工VPS→介绍+优惠码+测评+新手使用教程
  • 搬瓦工VPS换IP教程 bandwagonhost换IP
  • 搬瓦工官网(bandwagonhost官网是哪个)
  • 介绍→bandwagon , banwagonhost , bandwagonhost vp
  • 教程→搬瓦工VPS换机房 给bandwagonhost切换机房
  • 搬瓦工VPS(bandwagonhost)→cn2 gia涨价 优惠码 以及一些变动
  • 美国云服务器-美国VPS推荐之“顶级”商家“搬瓦工-bandwagonhost”
  • 搬瓦工香港vps怎么样?简单测评下bandwagonhost香港VPS(HK85 Equin
  • 搬瓦工香港vps怎么样?简单测评下bandwagonhost香港VPS(HK85 Equin

  • 猜你可能想看的VPS


    转载请注明原文地址:http://140.238.13.167:12355/read-147116.html

    下一篇       上一篇