I created this project in order to create connections to an otherwise protected zone, through async means (shared folder, e-mail)
It shows also some tests when working with sockets.
Communication client ⇆ Communication layer ⇆ Action server
Client ⇆ Session ⇆ Physical mean ⇆ Session ⇆ Server
- ✅ Bases classes (
CommunicationSession CommunicationClient CommunicationServer
)) - ✅ Test communication through queue (
QueueCommunicationSession
)) - ✅ Exchange of files through folder (like NFS, or shared folder) (
FolderCommunicationSession FolderCommClient FolderCommServer
)) - ✅ FTP (
FtpCommServer FtpCommunicationSession FtpCommClient
) - ✅ Imap (e-mail server) (
Imap4CommServer ImapCommSession Imap4CommClient
)- 💡 Imap with notifications/shared connections (otherwise multiple searches may be too big for the server)
- 💡 Socket (not really useful)
- ✅ For test: (
EchoActionServer StoreAllActionServer
) - ✅ Console / ✅Shell (Bash or other program) communicating with stdin/stdout/stderr (
GenericPipeActionServer PipeActionServer PipeLineClient
) - ✅ Socket / Connection to other socket (ssh, rdesktop, vnc)
- ✅ Socket / Connection to local socket
- ✅ Http proxy (
TcpSocketActionServer runLocalServerForRemoteClient
) and (serverOwnProxyOnFolder.py
) - ✅ SOCKS proxy v4 and v4a! (
Socks4Backend SocksFrontEnd
)
- ✅ : Method to clean shared space
💡 : ideas
🚧 : in construction
✅ : complete
See src/remoteconanywhere/cred.py
- ✅ .netrc file
- ✅ local file
- 💡 : commands to all/one servers:
- redistribute capabilities (if cleaned by a client)
- stop
- display statistics (opened sessions, all sessions since start, etc)
###### on the server side:
from remoteconanywhere.communication import *
from remoteconanywhere.pipe import *
# choose and configure one server
server = FolderCommServer('/path/to/folder')
# register action servers
server.registerCapability(GenericPipeActionServer())
server.registerCapability(PipeActionServer(sys.executable, '-i', '-u'))
server.registerCapability(PipeActionServer('/bin/bash', '-i'))
# start the server
server.serveForever()
###### on the client side:
# select the client to use
client = FolderCommClient('/path/to/folder')
# check server/capabilities
client.listServers()
client.capabilities('serverid')
# open a session, give it to the capability client
session = client.openSession('serverid', 'pipe')
PipeLineClient(session).start()
🚧 In construction, old API, kept here for the parameters, when a new bash api will be written
python3 test_socket.py asyncio 8910 www.google.com 443 &
wget --no-check-certificate https://127.0.0.1:8910
python3 remoteconanywhere.py --help
python3 remoteconanywhere.py imaptest --host imap.gmail.com:ssl