Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
coco
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
coco
Commits
61bae649
Unverified
Commit
61bae649
authored
Aug 05, 2019
by
BaiJiangJie
Committed by
GitHub
Aug 05, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #258 from jumpserver/dev_bai
[Update] Telent连接,添加终端类型配置项(选项协商使用)
parents
3e4529a0
e5578a29
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
conf.py
coco/conf.py
+1
-0
connection.py
coco/connection.py
+2
-1
config_example.yml
config_example.yml
+3
-0
No files found.
coco/conf.py
View file @
61bae649
...
...
@@ -377,6 +377,7 @@ defaults = {
'UPLOAD_FAILED_REPLAY_ON_START'
:
True
,
'REUSE_CONNECTION'
:
True
,
'FORCE_REMOVE_FOLDER'
:
False
,
'TELNET_TTYPE'
:
'XTERM-256COLOR'
,
}
...
...
coco/connection.py
View file @
61bae649
...
...
@@ -344,7 +344,8 @@ class TelnetConnection:
elif
x
==
telnetlib
.
DO
+
telnetlib
.
TTYPE
:
new_data_list
.
append
(
telnetlib
.
WILL
+
telnetlib
.
TTYPE
)
elif
x
==
telnetlib
.
SB
+
telnetlib
.
TTYPE
+
b
'
\x01
'
:
new_data_list
.
append
(
telnetlib
.
SB
+
telnetlib
.
TTYPE
+
b
'
\x00
'
+
b
'XTERM-256COLOR'
)
terminal_type
=
bytes
(
config
.
TELNET_TTYPE
,
encoding
=
'utf-8'
)
new_data_list
.
append
(
telnetlib
.
SB
+
telnetlib
.
TTYPE
+
b
'
\x00
'
+
terminal_type
)
elif
telnetlib
.
DO
in
x
:
new_data_list
.
append
(
x
.
replace
(
telnetlib
.
DO
,
telnetlib
.
WONT
))
elif
telnetlib
.
WILL
in
x
:
...
...
config_example.yml
View file @
61bae649
...
...
@@ -63,3 +63,6 @@ BOOTSTRAP_TOKEN: <PleasgeChangeSameWithJumpserver>
# 是否强制删除文件夹:(default false)
# FORCE_REMOVE_FOLDER: false
# Telnet连接协商使用的终端类型
# TELNET_TTYPE: XTERM-256COLOR
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