Submitted by 伤心 on 2023, December 25, 2:57 PM
为了上传文件方便一点,所以豆子偷空在vps上装了rclone,并使用rclone挂载google drive。为了查找方便,特记录一下步骤。首先,
vps需要安装rclone。操作环境是ubuntu 20.04,其他系统雷同。
apt install rclone -y
查看rclone版本:
rclone --version
显示:
rclone v1.50.2- os/arch: linux/arm64- go version: go1.13.8
接下来配置rclone挂载
输入:
rclone config
显示:
2023/12/25 09:15:24 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaultsNo remotes found - make a new onen) New remotes) Set configuration passwordq) Quit confign/s/q>
输入n,回车
然后输入配置的名字(需要英文输入),然后回车
显示:
Type of storage to configure.Enter a string value. Press Enter for the default ("").Choose a number from below, or type in your own value 1 / 1Fichier \ "fichier" 2 / Alias for an existing remote \ "alias" 3 / Amazon Drive \ "amazon cloud drive" 4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc) \ "s3" 5 / Backblaze B2 \ "b2" 6 / Box \ "box" 7 / Cache a remote \ "cache" 8 / Citrix Sharefile \ "sharefile" 9 / Dropbox \ "dropbox"10 / Encrypt/Decrypt a remote \ "crypt"11 / FTP Connection \ "ftp"12 / Google Cloud Storage (this is not Google Drive) \ "google cloud storage"13 / Google Drive \ "drive"14 / Google Photos \ "google photos"15 / Hubic \ "hubic"16 / JottaCloud \ "jottacloud"17 / Koofr \ "koofr"18 / Local Disk \ "local"19 / Mail.ru Cloud \ "mailru"20 / Microsoft Azure Blob Storage \ "azureblob"21 / Microsoft OneDrive \ "onedrive"22 / OpenDrive \ "opendrive"23 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH) \ "swift"24 / Pcloud \ "pcloud"25 / Put.io \ "putio"26 / SSH/SFTP Connection \ "sftp"27 / Transparently chunk/split large files \ "chunker"28 / Union merges the contents of several remotes \ "union"29 / Webdav \ "webdav"30 / Yandex Disk \ "yandex"31 / http Connection \ "http"32 / premiumize.me \ "premiumizeme"
输入你要挂载的类型,比如豆子挂载的是google drive,这里就输入13,然后回车
** See help for drive backend at: https://rclone.org/drive/ **Google Application Client IdSetting your own is recommended.See https://rclone.org/drive/#making-your-own-client-id for how to create your own.If you leave this blank, it will use an internal key which is low performance.Enter a string value. Press Enter for the default ("").client_id> ##这里输入client_id,不知道的可以自行google 然后回车Google Application Client SecretSetting your own is recommended.Enter a string value. Press Enter for the default ("").client_secret> ## 这里输入密钥,然后回车Scope that rclone should use when requesting access from drive.Enter a string value. Press Enter for the default (""). ##这里直接回车
然后让你选择权限:
Choose a number from below, or type in your own value 1 / Full access all files, excluding Application Data Folder. \ "drive" 2 / Read-only access to file metadata and file contents. \ "drive.readonly" / Access to files created by rclone only. 3 | These are visible in the drive website. | File authorization is revoked when the user deauthorizes the app. \ "drive.file" / Allows read and write access to the Application Data folder. 4 | This is not visible in the drive website. \ "drive.appfolder" / Allows read-only access to file metadata but 5 | does not allow any access to read or download file content. \ "drive.metadata.readonly"scope>
这里豆子输入的全部权限,也就是1,然后回车接着,需要选择挂载硬盘的路径,如果是全盘挂载,那么直接回车,但是豆子是挂载的指定文件夹,所以需要输入folder的id
ID of the root folderLeave blank normally.Fill in to access "Computers" folders (see docs), or for rclone to usea non root folder as its starting point.Note that if this is blank, the first time rclone runs it will fill itin with the ID of the root folder.Enter a string value. Press Enter for the default ("").root_folder_id> ##输入文件夹的id后,回车
接着提示是否进行高级配置,这里豆子选n,然后回车然后询问是否自动配置,照样选n,然后回车
Service Account Credentials JSON file path Leave blank normally.Needed only if you want use SA instead of interactive login.Enter a string value. Press Enter for the default ("").service_account_file> Edit advanced config? (y/n)y) Yesn) Noy/n> nRemote configUse auto config? * Say Y if not sure * Say N if you are working on a remote or headless machiney) Yesn) Noy/n> n
然后会返回一个网址,复制出来,在浏览器中打开,然后授权,会给你一个授权密钥,复制密钥后,返回到ssh界面,然后粘贴进去,回车。然后会询问是否团队协作盘,这里豆子的并非是团队盘,所以选n,回车。
Configure this as a team drive?y) Yesn) Noy/n> n
然后会返回一大堆刚才的配置,接着询问是否完成等等
y) Yes this is OKe) Edit this remoted) Delete this remotey/e/d> yCurrent remotes:Name Type==== ====XXX drivee) Edit existing remoten) New remoted) Delete remoter) Rename remotec) Copy remotes) Set configuration passwordq) Quit confige/n/d/r/c/s/q> q
到这一步,rclone配置完成,现在使用命令进行挂载到vps上。
创建挂载目录,并进行挂载:
mkdir -p /opt/gdrclone mount XXX: /opt/gd --allow-other --allow-non-empty --vfs-cache-mode writes --daemon
其中
opt/gd路径,是可以自己选择自己想要的路径。到这里,就基本完成,如果你vps装的有面板,那么重启一下面板就可以看到你挂载的硬盘已经展示出来了。
网络汇集 | 评论:0
| Trackbacks:0
| 阅读:399
Submitted by 伤心 on 2021, January 17, 12:11 PM
今天又爆出麻花家软件会读取浏览器浏览历史并上传,故有大佬写了火绒规则来禁止。代码保存为JSON即可导入食用方法:火绒-防护中心-高级防护-自定义防护-导入 选择规则即可
代码如下:
- {
- \"ver\":\"5.0\",
- \"tag\":\"hipsuser\",
- \"data\":[
- {
- \"id\":11,
- \"power\":0,
- \"name\":\"QQ禁止访问浏览器历史记录(Chrome系列 Firefox)\",
- \"procname\":\"QQ.exe\",
- \"treatment\":1,
- \"policies\":[
- {
- \"montype\":1,
- \"action_type\":15,
- \"res_path\":\"*\\\\AppData\\\\Local\\\\*\\\\User Data\\\\Default\\\\History\"
- },
- {
- \"montype\":1,
- \"action_type\":15,
- \"res_path\":\"*\\\\AppData\\\\Roaming\\\\Mozilla\\\\Firefox\\\\Profiles\\\\*\"
- }
- ]
- },
- {
- \"id\":14,
- \"power\":0,
- \"name\":\"QQ禁止遍历Local文件夹\",
- \"procname\":\"QQ.exe\",
- \"treatment\":1,
- \"policies\":[
- {
- \"montype\":1,
- \"action_type\":15,
- \"res_path\":\"*\\\\AppData\\\\Local\\\\*\"
- }
- ]
- },
- {
- \"id\":13,
- \"power\":0,
- \"name\":\"Tim禁止访问浏览器历史记录(Chrome系列 Firefox)\",
- \"procname\":\"Tim.exe\",
- \"treatment\":1,
- \"policies\":[
- {
- \"montype\":1,
- \"action_type\":15,
- \"res_path\":\"*\\\\AppData\\\\Local\\\\*\\\\User Data\\\\Default\\\\History\"
- },
- {
- \"montype\":1,
- \"action_type\":15,
- \"res_path\":\"*\\\\AppData\\\\Roaming\\\\Mozilla\\\\Firefox\\\\Profiles\\\\*\"
- }
- ]
- },
- {
- \"id\":15,
- \"power\":0,
- \"name\":\"Tim禁止遍历Local文件夹\",
- \"procname\":\"Tim.exe\",
- \"treatment\":1,
- \"policies\":[
- {
- \"montype\":1,
- \"action_type\":15,
- \"res_path\":\"*\\\\AppData\\\\Local\\\\*\"
- }
- ]
- }
- ]
- }
本文转自Hostloc:https://www.hostloc.com/thread-797568-1-1.html
Tags: 火绒, 规则, 禁止读取
网络汇集 | 评论:0
| Trackbacks:0
| 阅读:1505
Submitted by 伤心 on 2019, May 16, 3:45 PM
其实豆子最近过的真的很辛苦,看着每天无所事事,其实内心的焦虑一直没有减少……趁着还有点时间,还有点激情的时候,把域名出售单页改了,是根据西数的域名出售单页修改成自己全部域名的出售了。演示图:
感觉页面好长的说……演示地址:http://mum.cx
Tags: domain, 出售单页, 域名, 西部数码, 豆子
网络汇集 | 评论:0
| Trackbacks:0
| 阅读:1110
Submitted by 伤心 on 2019, April 30, 9:08 PM
测试外链
美狮外汇赚美元:
Tags: 外链, onedrive
网络汇集 | 评论:0
| Trackbacks:0
| 阅读:1592
Submitted by 伤心 on 2018, October 18, 10:19 AM
今天豆子看到有朋友留言咨询xrea去广告问题,豆子目前只有一种关于wordpress插件去广告的方法,其他的未去尝试。现在把插件下载地址公布,有需要的朋友可以自行下载研究。不过,豆子还是衷心的建议不去除广告,毕竟免费的东西才是最为昂贵的,豆子目前是没办法才把博客放在xrea的,反正豆子的博客平日里也没什么人看。只是作为豆子自己记录东西使用而已。最后再啰嗦一句,如果你和豆子一样迫不得已用了免费空间,一定要记得备份自己的数据哦~
下载地址:
豆子外链下载
Tags: xrea, 去广告, 插件
网络汇集 | 评论:0
| Trackbacks:0
| 阅读:2376
Submitted by 伤心 on 2018, May 30, 3:03 PM
Ubuntu/Debian执行命令
apt-get install php5-memcache memcached php5-memcached
service apache2 restart
Centos
yum install –enablerepo=remi php-pecl-memcache memcached libmemcached -y
service httpd restart
Tags: memcache, vestacp
网络汇集 | 评论:0
| Trackbacks:0
| 阅读:1328
Submitted by 伤心 on 2016, October 3, 3:21 PM
本来豆子是远程桌面去看vps的,链接了2次,没连上,以为是vps宕机了,于是就登陆后台去查看状态。登陆后台以后,发现有新的消息,提示有promo!怀着好奇之心,豆子点进去查看,原来是推特小任务奖励3刀!很简单的3个步骤,验证推特账号,关注vultr推,推文,ok!大功告成,3刀入账!任务看图:
账户入账图:
还可以吧,又可以免费用半个月了!呵呵。现在注册账号,还可以免费获得20刀哦!
https://sae.cx/xg
Tags: promo, vps, vultr, 豆子
网络汇集 | 评论:0
| Trackbacks:0
| 阅读:1345
Submitted by 伤心 on 2016, September 21, 10:40 AM
豆子很早就听说过这家了,可惜当初特价的没买到,刚好得到消息,趁着目前有便宜点的vps就入手了一台。搬瓦工_Bandwagonhost是一家美国VPS主机商,主打低价稳定性VPS业务,采用OpenVZ虚拟架构,在国人圈子里面可以说有口皆碑了;自行开发的控制面板,可以一键重装系统、一键重装vpn/shadowsocks服务等,支持支付宝付款;这次补货的为凤凰城机房(不支持切换),国内的速度也还是不错的。另外,因为原官网域名被墙,启用了全新域名。优惠码:
IAMSMART5EM2BR ,3.4%
IAMSMART5SS6ML, 2.99%
IAMSMART50BAR1, 4.66%
IAMSMART571GOR ,3.71%
IAMSMART5TDT48 ,3.82%
IAMSMART53GEI6 ,3.84%
IAMSMART52J3NC ,1.29%
IAMSMART5YA8FO ,4.41%
IAMSMART5FQ956,4.96%
优惠方案
- 核心:1核CPU
- 内存:512MB
- 硬盘:10GB
- 流量:1TB
- 端口:1Gbps
- 架构:OpenVZ
- 价格:$11/year
- 传送:购买链接
|
- 核心:1核CPU
- 内存:1GB
- 硬盘:20GB
- 流量:2TB
- 端口:1Gbps
- 架构:OpenVZ
- 价格:$18/year
- 传送:购买链接
|
|
由于安全问题,就不放出测试ip了。
Tags: openvz, vps, 凤凰城, 搬瓦工, 豆子
网络汇集 | 评论:0
| Trackbacks:0
| 阅读:1300
Submitted by 伤心 on 2011, October 11, 11:52 AM
想必现在不少人都发现新版Gmail没有退出的那个按钮了吧?想登录其他账户,结果却找不到退出键,是不是很急啊?其实有心人都可以找到。。。算了,还是别找了,直接给你个地址退出吧。
- https://mail.google.com/mail/?logout&hl=zh-CN
用这个地址就可以退出账户了。
Tags: gmail
网络汇集 | 评论:0
| Trackbacks:0
| 阅读:2570
Submitted by 伤心 on 2011, October 10, 12:52 PM
想必现在不少人都发现新版Gmail没有退出的那个按钮了吧?想登录其他账户,结果却找不到退出键,是不是很急啊?其实有心人都可以找到。。。算了,还是别找了,直接给你个地址退出吧。
- https://mail.google.com/mail/?logout&hl=zh-CN
用这个地址就可以退出账户了。
网络汇集 | 评论:0
| Trackbacks:0
| 阅读:1461