Skip to content

Commit

Permalink
perf: When connected through a gateway, you can use nc to forward data (
Browse files Browse the repository at this point in the history
jumpserver#14110)

Co-authored-by: feng <[email protected]>
Co-authored-by: Bryan <[email protected]>
  • Loading branch information
3 people authored Sep 9, 2024
1 parent 1417abe commit 6264319
Show file tree
Hide file tree
Showing 7 changed files with 1,058 additions and 684 deletions.
6 changes: 6 additions & 0 deletions apps/assets/const/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ def device_protocols(cls):
'default': False,
'label': _('Old SSH version'),
'help_text': _('Old SSH version like openssh 5.x or 6.x')
},
'nc': {
'type': 'bool',
'default': False,
'label': 'Netcat (nc)',
'help_text': _('Netcat help text')
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion apps/assets/models/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class GatewayManager(OrgManager):
def get_queryset(self):
queryset = super().get_queryset()
queryset = queryset.filter(platform__name=GATEWAY_NAME)
queryset = queryset.filter(platform__name__startswith=GATEWAY_NAME)
return queryset

def bulk_create(self, objs, batch_size=None, ignore_conflicts=False):
Expand Down
70 changes: 37 additions & 33 deletions apps/i18n/core/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-09 14:22+0800\n"
"POT-Creation-Date: 2024-09-09 16:05+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -366,7 +366,7 @@ msgstr ""
msgid "Su from"
msgstr "Switch from"

#: accounts/models/account.py:55 assets/const/protocol.py:189
#: accounts/models/account.py:55 assets/const/protocol.py:195
#: settings/serializers/auth/cas.py:25 terminal/models/applet/applet.py:36
#: terminal/models/virtualapp/virtualapp.py:21
msgid "Version"
Expand Down Expand Up @@ -1583,7 +1583,7 @@ msgstr ""
msgid "Basic"
msgstr ""

#: assets/const/base.py:34 assets/const/protocol.py:292
#: assets/const/base.py:34 assets/const/protocol.py:298
#: assets/models/asset/web.py:13
msgid "Script"
msgstr ""
Expand Down Expand Up @@ -1661,36 +1661,40 @@ msgstr ""
msgid "Old SSH version like openssh 5.x or 6.x"
msgstr ""

#: assets/const/protocol.py:58
#: assets/const/protocol.py:53
msgid "Netcat help text"
msgstr "Use netcat (nc) as a proxy tool to forward connections from the proxy server to the target host. This is useful in environments that do not support the SSH native proxy option (-W), or when more flexibility and timeout control are needed."

#: assets/const/protocol.py:64
msgid "SFTP root"
msgstr ""

#: assets/const/protocol.py:60
#: assets/const/protocol.py:66
#, python-brace-format
msgid ""
"SFTP root directory, Support variable: <br>- ${ACCOUNT} The connected "
"account username <br>- ${HOME} The home directory of the connected account "
"<br>- ${USER} The username of the user"
msgstr ""

#: assets/const/protocol.py:75
#: assets/const/protocol.py:81
msgid "Console"
msgstr ""

#: assets/const/protocol.py:76
#: assets/const/protocol.py:82
msgid "Connect to console session"
msgstr ""

#: assets/const/protocol.py:80
#: assets/const/protocol.py:86
msgid "Any"
msgstr ""

#: assets/const/protocol.py:82 rbac/tree.py:62
#: assets/const/protocol.py:88 rbac/tree.py:62
#: settings/serializers/security.py:232
msgid "Security"
msgstr ""

#: assets/const/protocol.py:83
#: assets/const/protocol.py:89
msgid ""
"Security layer to use for the connection:<br>Any<br>Automatically select the "
"security mode based on the security protocols supported by both the client "
Expand All @@ -1701,100 +1705,100 @@ msgid ""
"and password to be given in advance"
msgstr ""

#: assets/const/protocol.py:100
#: assets/const/protocol.py:106
msgid "AD domain"
msgstr ""

#: assets/const/protocol.py:115
#: assets/const/protocol.py:121
msgid "Username prompt"
msgstr ""

#: assets/const/protocol.py:116
#: assets/const/protocol.py:122
msgid "We will send username when we see this prompt"
msgstr ""

#: assets/const/protocol.py:121
#: assets/const/protocol.py:127
msgid "Password prompt"
msgstr ""

#: assets/const/protocol.py:122
#: assets/const/protocol.py:128
msgid "We will send password when we see this prompt"
msgstr ""

#: assets/const/protocol.py:127
#: assets/const/protocol.py:133
msgid "Success prompt"
msgstr ""

#: assets/const/protocol.py:128
#: assets/const/protocol.py:134
msgid "We will consider login success when we see this prompt"
msgstr ""

#: assets/const/protocol.py:139 assets/models/asset/database.py:10
#: assets/const/protocol.py:145 assets/models/asset/database.py:10
#: settings/serializers/msg.py:49
msgid "Use SSL"
msgstr ""

#: assets/const/protocol.py:174
#: assets/const/protocol.py:180
msgid "SYSDBA"
msgstr ""

#: assets/const/protocol.py:175
#: assets/const/protocol.py:181
msgid "Connect as SYSDBA"
msgstr ""

#: assets/const/protocol.py:190
#: assets/const/protocol.py:196
msgid ""
"SQL Server version, Different versions have different connection drivers"
msgstr ""

#: assets/const/protocol.py:220
#: assets/const/protocol.py:226
msgid "Auth source"
msgstr ""

#: assets/const/protocol.py:221
#: assets/const/protocol.py:227
msgid "The database to authenticate against"
msgstr ""

#: assets/const/protocol.py:226 authentication/models/connection_token.py:43
#: assets/const/protocol.py:232 authentication/models/connection_token.py:43
msgid "Connect options"
msgstr ""

#: assets/const/protocol.py:227
#: assets/const/protocol.py:233
msgid "The connection specific options eg. retryWrites=false&retryReads=false"
msgstr ""

#: assets/const/protocol.py:239
#: assets/const/protocol.py:245
msgid "Auth username"
msgstr ""

#: assets/const/protocol.py:262
#: assets/const/protocol.py:268
msgid "Safe mode"
msgstr ""

#: assets/const/protocol.py:264
#: assets/const/protocol.py:270
msgid ""
"When safe mode is enabled, some operations will be disabled, such as: New "
"tab, right click, visit other website, etc."
msgstr ""

#: assets/const/protocol.py:269 assets/models/asset/web.py:9
#: assets/const/protocol.py:275 assets/models/asset/web.py:9
#: assets/serializers/asset/info/spec.py:16
msgid "Autofill"
msgstr ""

#: assets/const/protocol.py:277 assets/models/asset/web.py:10
#: assets/const/protocol.py:283 assets/models/asset/web.py:10
msgid "Username selector"
msgstr ""

#: assets/const/protocol.py:282 assets/models/asset/web.py:11
#: assets/const/protocol.py:288 assets/models/asset/web.py:11
msgid "Password selector"
msgstr ""

#: assets/const/protocol.py:287 assets/models/asset/web.py:12
#: assets/const/protocol.py:293 assets/models/asset/web.py:12
msgid "Submit selector"
msgstr ""

#: assets/const/protocol.py:310
#: assets/const/protocol.py:316
msgid "API mode"
msgstr ""

Expand Down
Loading

0 comments on commit 6264319

Please sign in to comment.