Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow external connections to DFHack remote services. #1173

Merged
merged 25 commits into from Feb 13, 2018

Conversation

RosaryMala
Copy link
Member

This needs a bit more work before it's ready to merge, but I figured I'd get some feedback here anyway.

The idea is that the more dangerous functions, like the "run any command" or "run arbitary lua code" functions are barred if they don't come from localhost, while relatively safe functions can be run from other computers or devices, like reading the map, or setting designations, etc.

@lethosor lethosor added this to the 0.44.x-r2 milestone Feb 5, 2018
@lethosor
Copy link
Member

Is this merge-ready? Also, are the conflicts irrelevant (i.e. can I just go with the develop branch versions of the RFR files), or are there important changes here?

It appears that spoofing localhost's IP isn't realistic, but as long as DFHack still listens only on 127.0.0.1 by default, this should be fine (anyone enabling this feature should understand the risks).

@RosaryMala
Copy link
Member Author

I'll have to take a look.

I want both the enabled state, as well as the port, to be settable in a json file. I'll have to check to make sure they are.

…erUnsafe

# Conflicts:
#	plugins/proto/RemoteFortressReader.proto
#	plugins/remotefortressreader/remotefortressreader.cpp
#	scripts
@lethosor
Copy link
Member

Cool. Looks like the only build issue was a missing script, probably due to submodule stuff I can handle.

@lethosor
Copy link
Member

@JapaMala did you check?

@RosaryMala
Copy link
Member Author

Looks like it's in there. Should be fine.

@lethosor
Copy link
Member

Getting this on a fresh install on OS X:

terminate called after throwing an instance of 'Json::LogicError'
  what():  Value is not convertible to bool.

I suspect it has something to do with the config file not existing.

@RosaryMala
Copy link
Member Author

I'll look into it.

Copy link
Member

@lethosor lethosor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default behavior is ok now

@lethosor lethosor merged commit 74bf06c into DFHack:develop Feb 13, 2018
@RosaryMala RosaryMala deleted the RemoteServerUnsafe branch April 7, 2018 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants