|  | @@ -1,9 +1,9 @@
 | 
											
												
													
														|  |  package kcp
 |  |  package kcp
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  import (
 |  |  import (
 | 
											
												
													
														|  | -	"math/rand"
 |  | 
 | 
											
												
													
														|  |  	"net"
 |  |  	"net"
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +	"github.com/v2ray/v2ray-core/common/dice"
 | 
											
												
													
														|  |  	"github.com/v2ray/v2ray-core/common/log"
 |  |  	"github.com/v2ray/v2ray-core/common/log"
 | 
											
												
													
														|  |  	v2net "github.com/v2ray/v2ray-core/common/net"
 |  |  	v2net "github.com/v2ray/v2ray-core/common/net"
 | 
											
												
													
														|  |  	"github.com/v2ray/v2ray-core/transport/internet"
 |  |  	"github.com/v2ray/v2ray-core/transport/internet"
 | 
											
										
											
												
													
														|  | @@ -18,7 +18,7 @@ func DialKCP(src v2net.Address, dest v2net.Destination) (internet.Connection, er
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  	cpip := NewSimpleAuthenticator()
 |  |  	cpip := NewSimpleAuthenticator()
 | 
											
												
													
														|  | -	session := NewConnection(uint16(rand.Uint32()), conn, conn.LocalAddr().(*net.UDPAddr), conn.RemoteAddr().(*net.UDPAddr), cpip)
 |  | 
 | 
											
												
													
														|  | 
 |  | +	session := NewConnection(uint16(dice.Roll(65536)), conn, conn.LocalAddr().(*net.UDPAddr), conn.RemoteAddr().(*net.UDPAddr), cpip)
 | 
											
												
													
														|  |  	session.FetchInputFrom(conn)
 |  |  	session.FetchInputFrom(conn)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  	return session, nil
 |  |  	return session, nil
 |