James Moger
2015-11-22 ed552ba47c02779c270ffd62841d6d1048dade70
commit | author | age
56b3f3 1 /*
JM 2  * Copyright 2014 gitblit.com.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy of
6  * the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations under
14  * the License.
15  */
924c9b 16 package com.gitblit.transport.ssh;
JM 17
9ba6bc 18 import org.apache.sshd.common.SshdSocketAddress;
d41034 19 import org.apache.sshd.common.session.Session;
JM 20 import org.apache.sshd.server.forward.ForwardingFilter;
924c9b 21
JM 22 public class NonForwardingFilter implements ForwardingFilter {
d41034 23
924c9b 24     @Override
d41034 25     public boolean canConnect(Type type, SshdSocketAddress address, Session session) {
924c9b 26         return false;
JM 27     }
28
29     @Override
9ba6bc 30     public boolean canForwardAgent(Session session) {
924c9b 31         return false;
JM 32     }
33
34     @Override
9ba6bc 35     public boolean canForwardX11(Session session) {
924c9b 36         return false;
JM 37     }
38
39     @Override
9ba6bc 40     public boolean canListen(SshdSocketAddress address, Session session) {
924c9b 41         return false;
JM 42     }
43 }