-
-
Notifications
You must be signed in to change notification settings - Fork 409
C9 #200
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
Open
dirkcgrunwald
wants to merge
5
commits into
rawpython:master
Choose a base branch
from
dirkcgrunwald:c9
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
C9 #200
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f92010b
changes to make this work in Cloud9 with the CS50 VM
dirkcgrunwald 931b62f
suppress launch webbrowser on c9 in better way
dirkcgrunwald 9a9cc32
add readme
dirkcgrunwald 3349677
make c9 change a little more robust
dirkcgrunwald c6fc362
add ellipse SVG object
dirkcgrunwald File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## Modifictions for cloud9 | ||
|
||
Cloud9 is web IDE system that can proxy web & websockets connections | ||
to applications. Because of the proxying, the base REMI system does | ||
not work -- for example, the original REMI code uses the IP address of | ||
the server to configure the JavaScript code to specify the host that | ||
the WS should connect to. In C9, this is the internal (non-routed) IP | ||
address. Thus, a number of small changes are made to make the code work | ||
better in C9. | ||
|
||
Another change has to do with the key exchange in WS. For reasons not | ||
completely clear to me, the C9 proxy appears to lower-case the HTTP | ||
response received by the server. This causes the base REMI code to | ||
fail, so I added a specific for extracting the WS key when the lower | ||
can version on C9. | ||
|
||
To install on C9, use `sudo pip install git+https://github.com/dirkcgrunwald/remi.git@c9` | ||
|
||
You should then be able to run any of the examples. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @dirkcgrunwald !
Looking at changes you made, I suppose that beside others, these 8 grouped lines (from 150 to 158) are the necessary part to be C9 compatible. Others are refinements. Is this correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 2-3 others parts that are needed.
In if 'C9_HOSTNAME' in os.environ:
it appears that the C9 proxy makes the response headers in lower case. It's also possible to use a try...except to try the upper case, fail and then revert to lower case.
In addition, in the default setup, if you use '0.0.0.0' as the host IP, remi changes this to 127.0.0.1, which isn't proxied. The user doesn't know the IP address of their server because of the proxy, so they need to leave '0.0.0.0' as an option. I had guarded those changes with checks for the C9 environment.
This may all be moot since C9 is being changed to AWS Cloud and I think those don't use the proxy.