Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nxssh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rx-etersoft
nxssh
Commits
6ea00158
Commit
6ea00158
authored
Nov 08, 2016
by
Stas Korobeynikov
Committed by
Pavel Vainerman
Oct 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add nx proxy
parent
74109f5c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
138 additions
and
1 deletion
+138
-1
Makefile.in
Makefile.in
+1
-1
proxy.c
proxy.c
+0
-0
proxy.h
proxy.h
+137
-0
No files found.
Makefile.in
View file @
6ea00158
...
...
@@ -95,7 +95,7 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
platform-pledge.o platform-tracing.o
SSHOBJS
=
ssh.o readconf.o clientloop.o sshtty.o
\
sshconnect.o sshconnect1.o sshconnect2.o mux.o
sshconnect.o sshconnect1.o sshconnect2.o mux.o
proxy.o
SSHDOBJS
=
sshd.o auth-rhosts.o auth-passwd.o
\
audit.o audit-bsm.o audit-linux.o platform.o
\
...
...
proxy.c
0 → 100644
View file @
6ea00158
This diff is collapsed.
Click to expand it.
proxy.h
0 → 100644
View file @
6ea00158
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
/* */
/* NXSSH, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
/* software is allowed according to terms specified in the file LICENSE */
/* which comes in the source distribution. */
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
/**************************************************************************/
/*
* Do we share the debug log with the proxy?
*/
extern
int
nx_proxy_log
;
/*
* Do we check for the incoming command? This flag
* should be bound to a command line parameter.
*/
extern
int
nx_check_switch
;
/*
* Did we receive the command? Switch is executed at
* the time the first channel receives the command,
* thus it is important to note that port forwarding
* should always be disabled when enabling the check.
*/
extern
int
nx_switch_received
;
/*
* Parameters read from the switch command.
*/
extern
char
nx_switch_cookie
[
256
];
extern
char
nx_switch_host
[
256
];
extern
int
nx_switch_proxy
;
extern
int
nx_switch_port
;
extern
int
nx_switch_in
;
extern
int
nx_switch_out
;
extern
char
nx_switch_mode
[
256
];
extern
char
nx_switch_options
[
1024
];
extern
int
nx_switch_internal
;
extern
int
nx_switch_forward
;
/*
* Buffer the input while looking for the command.
* The buffering happens by flushing the input when
* a newline is received. This means that all input
* should be terminated with a newline or it will
* remain in the buffer and will never be sent to
* the packet interface.
*/
int
nx_check_channel_input
(
Channel
*
channel
,
char
*
data
,
int
*
length
,
int
limit
);
/*
* Replace the select() with the version managing
* the NX descriptors.
*/
int
nx_proxy_select
(
int
maxfds
,
fd_set
*
readfds
,
fd_set
*
writefds
,
fd_set
*
exceptfds
,
struct
timeval
*
timeout
);
/*
* Connect to the NX transport.
*/
int
nx_open_proxy_connection
();
/*
* Wait for the NX transport to terminate.
*/
int
nx_close_proxy_connection
();
/*
* If cookie was passed, manage authentication.
*/
int
nx_check_proxy_authentication
(
int
proxy_fd
);
/*
* Reassign the descriptors.
*/
int
nx_switch_client_side_descriptors
(
Channel
*
channel
,
int
proxy_fd
);
/*
* Reassign the descriptors.
*/
int
nx_switch_forward_descriptors
(
Channel
*
channel
);
/*
* Forward port to remote sshd.
*/
int
nx_switch_forward_port
(
Channel
*
channel
);
/*
* Used in ssh.c to monitor the standard input
* until the switch command is received.
*/
int
nx_check_standard_input
();
/*
* Used in ssh.c. Connect to the proxy and run the
* restricted loop forwarding the traffic to the
* local proxy.
*/
void
nx_switch_server_side_descriptors
();
/*
* Set the preferred options for using the socket
* with NX.
*/
void
nx_set_socket_options
(
int
fd
,
int
blocking
);
/*
* Wrappers used to get and set the environment.
*/
const
char
*
nx_get_environment
(
const
char
*
name
);
int
nx_set_environment
(
const
char
*
name
,
const
char
*
value
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment