RClone External IP rather than Internal for Verification


#1

I tried some googling and searched through the forums, but is there a way to do a custom rclone command to have it goto . external-ip:port rather than 127.0.0.1 using – rclone config create or even have it ask the user that question about unsure y/n if possible that the regular rclone conf does.

this information exist, https://rclone.org/remote_setup/ but only applies to using the regular rclone config; anyway to add to rclone config create?

seeing stuff about rclone authorize, but unsure how that works with it https://rclone.org/commands/rclone_authorize


#2

Check out:

https://rclone.org/rc/

It has all the commands there.


#3

Thanks! Will check out!


#4

so i tried the rc, but couldn’t get it to work. i’m under the impression that the rc is used to connect to another server. basically, i’m trying to setup the link so that it uses the ip address instead of local host. i did the rc and ip and just shows the localhost.

As in this case:

rclone config create bdrive drive --rc-addr=159.xx.xx.xx:30000 (took out the rest of the address)

But if you look below, it just ignores it. Using RClone 1.43

Remote config
If your browser doesn’t open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code…


using the local 127 is fine, but the problem is when your lets say at home and you have a remote server, your trying to get that google browser to come up.

Ok so it’s basically having the auth server come up to the external ip


#5

The 127.0.0.1 address is configured in the oauth of the cloud provider as the “Redirect URL” so you can’t easily change it.

What are you trying to achieve?

Could you explain the workflow you are trying to create?

rclone authorize gets a token for the user to paste into a remote machine. It is designed to run on the users local machine where they have access to a web browser.


#6

@ncw so i’m trying to automate more of rclone with the google sdk. with the google sdk, i can have the gdrive secret and gdrive user download. by using the custom config, i can have it automatically have it pull in rather than users typing/copying pasting it in.

right now, i have rclone automated to deploy teamdrives with the google sdk and make keys already. so having the gdrive and tdrive mount with a custom; basically rclone config custom comes up, user/secret already pulled in and just drops the questions about verification and call it a day. with a local box, this can be done, but most users have remote servers; so it’s impossible to use :smiley: thanks @ncw for taking the time to answer on it. thought i was going nuts with the command :smiley: if there was a flag of some type to use the external ip, it would be great. if i use --rc and then --rc-addr? it will use the remote ip; but rather for purpose of communicating; not verifying. like an --rc-addr-external would be great… haha :smiley:


#7

Such a flag would be easy enough to add - I’m not sure exactly how you’d use it though.

If you want to try an experiment, then change this line:

// bindAddress is binding for local webserver when active
bindAddress = "127.0.0.1:" + bindPort

To

// bindAddress is binding for local webserver when active
bindAddress = ":" + bindPort

And recompile rclone. It will bind to all addresses then. I’m still not clear on how you’d get the browser to speak to rclone though as the redirect URL will be http://localhost:XXXX/


#8

i understand and will try, if it doesn’t work, i’ll let you know. thanks always @ncw!