mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-26 14:11:46 +03:00
Implement TCP and ICMP rejects
This commit is contained in:
@@ -404,9 +404,15 @@ func (t *TUN) Close() error {
|
||||
)
|
||||
}
|
||||
|
||||
func (t *TUN) PrepareConnection(source M.Socksaddr, destination M.Socksaddr) error {
|
||||
// TODO: implement rejects
|
||||
return nil
|
||||
func (t *TUN) PrepareConnection(network string, source M.Socksaddr, destination M.Socksaddr) error {
|
||||
return t.router.PreMatch(adapter.InboundContext{
|
||||
Inbound: t.tag,
|
||||
InboundType: C.TypeTun,
|
||||
Network: network,
|
||||
Source: source,
|
||||
Destination: destination,
|
||||
InboundOptions: t.inboundOptions,
|
||||
})
|
||||
}
|
||||
|
||||
func (t *TUN) NewConnectionEx(ctx context.Context, conn net.Conn, source M.Socksaddr, destination M.Socksaddr, onClose N.CloseHandlerFunc) {
|
||||
|
||||
Reference in New Issue
Block a user