<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello,</div><div dir="ltr"><br></div><div dir="ltr">Is there is a way to disconnect a specific strongswan user from the command line?<br><div><br></div><div>I have found the Vici plugin, but there is no documentation whatsoever. It says check the comments in the code and it's still not clear to me.</div><div><br></div><div>All I could do so far was this</div><div><br></div><div>import vici</div><div>s = vici.Session()<br></div><div><div>>>> s.list_conns()</div><div><generator object Session.streamed_request at 0x7ff658411ed0></div></div><div><br></div><div>I have one connection on this test server, But I need somehow to filter for a specific user, if I had more connections.</div><div><br></div><div>Looking at the code there is a "filters" as an argument to pass in:</div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;color:rgb(233,226,222);background-color:rgb(39,40,34)"><span style="font-stretch:normal;font-size:11px;line-height:normal;color:rgb(249,38,114)">def</span> list_conns(self, filters=<span style="font-stretch:normal;font-size:11px;line-height:normal;color:rgb(249,38,114)">None</span>):</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(255,66,66);background-color:rgb(39,40,34)"><span style="font-stretch:normal;font-size:12px;line-height:normal;color:rgb(233,226,222)"> </span>"""Retrieve loaded connections.</p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;color:rgb(233,226,222);background-color:rgb(39,40,34);min-height:14px"><br></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(255,66,66);background-color:rgb(39,40,34)"> :param filters: retrieve only matching configuration names (optional)</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(255,66,66);background-color:rgb(39,40,34)"> :type filters: dict</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(255,66,66);background-color:rgb(39,40,34)"> :return: generator for loaded connections as dict</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(255,66,66);background-color:rgb(39,40,34)"> :rtype: generator</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(255,66,66);background-color:rgb(39,40,34)"> """</p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;color:rgb(233,226,222);background-color:rgb(39,40,34)"> <span style="font-stretch:normal;font-size:11px;line-height:normal;color:rgb(249,38,114)">return</span> self.streamed_request(<span style="font-stretch:normal;font-size:11px;line-height:normal;color:rgb(255,66,66)">"list-conns"</span>, <span style="font-stretch:normal;font-size:11px;line-height:normal;color:rgb(255,66,66)">"list-conn"</span>,</p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;color:rgb(233,226,222);background-color:rgb(39,40,34)"> filters)</p></div><div><br></div><div>But I'm stuck as I don't know how to set that. There must be some kind of documentation for this right? </div><div><br></div><div>I suppose once I have the actual SA, I could pass it to terminate(). </div><div><br></div><div>Many Thanks,</div><div>Houman</div><div><br></div></div></div></div></div></div></div></div></div></div></div></div>