|
@@ -76,7 +76,7 @@ type SessionData struct {
|
76
|
76
|
sessionID int64
|
77
|
77
|
}
|
78
|
78
|
|
79
|
|
-func (client *Client) AllSessionData(currentSession *Session) (data []SessionData, currentIndex int) {
|
|
79
|
+func (client *Client) AllSessionData(currentSession *Session, hasPrivs bool) (data []SessionData, currentIndex int) {
|
80
|
80
|
currentIndex = -1
|
81
|
81
|
client.stateMutex.RLock()
|
82
|
82
|
defer client.stateMutex.RUnlock()
|
|
@@ -93,13 +93,15 @@ func (client *Client) AllSessionData(currentSession *Session) (data []SessionDat
|
93
|
93
|
certfp: session.certfp,
|
94
|
94
|
deviceID: session.deviceID,
|
95
|
95
|
sessionID: session.sessionID,
|
96
|
|
- connInfo: utils.DescribeConn(session.socket.conn.UnderlyingConn().Conn),
|
97
|
96
|
}
|
98
|
97
|
if session.proxiedIP != nil {
|
99
|
98
|
data[i].ip = session.proxiedIP
|
100
|
99
|
} else {
|
101
|
100
|
data[i].ip = session.realIP
|
102
|
101
|
}
|
|
102
|
+ if hasPrivs {
|
|
103
|
+ data[i].connInfo = utils.DescribeConn(session.socket.conn.UnderlyingConn().Conn)
|
|
104
|
+ }
|
103
|
105
|
}
|
104
|
106
|
return
|
105
|
107
|
}
|