亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? openvpn.c

?? OpenVPN -- A Secure tunneling daemon
?? C
?? 第 1 頁 / 共 4 頁
字號:
	  frame_finalize_options (&frame, options);	  test_crypto (&crypto_options, &frame);	  key_schedule_free (ks);	  signal_received = 0;#ifdef USE_PTHREAD	  if (first_time)	    work_thread_join ();#endif	  goto done;	}    }#ifdef USE_SSL  else if (options->tls_server || options->tls_client)    {      /*       * TLS-based dynamic key exchange mode       */      struct tls_options to;      bool packet_id_long_form;      ASSERT (!options->test_crypto);      /* Make sure we are either a TLS client or server but not both */      ASSERT (options->tls_server == !options->tls_client);      /* Let user specify a script to verify the incoming certificate */      tls_set_verify_command (options->tls_verify);      if (!ks->ssl_ctx)	{	  /*	   * Initialize the OpenSSL library's global	   * SSL context.	   */	  ks->ssl_ctx = init_ssl (options->tls_server,				  options->ca_file,				  options->dh_file,				  options->cert_file,				  options->priv_key_file,				  options->cipher_list);	  /* Get cipher & hash algorithms */	  init_key_type (&ks->key_type, options->ciphername,			 options->ciphername_defined, options->authname,			 options->authname_defined, options->keysize,			 true);	  /* TLS handshake authentication (--tls-auth) */	  if (options->tls_auth_file)	    get_tls_handshake_key (&ks->key_type, &ks->tls_auth_key, options->tls_auth_file);	}      else	{	  msg (M_INFO, "Re-using SSL/TLS context");	}      /* Sanity check on IV, sequence number, and cipher mode options */      check_replay_iv_consistency(&ks->key_type, options->packet_id, options->iv);      /* In short form, unique datagram identifier is 32 bits, in long form 64 bits */      packet_id_long_form = cfb_ofb_mode (&ks->key_type);      /* Compute MTU parameters */      crypto_adjust_frame_parameters(&frame,				     &ks->key_type,				     options->ciphername_defined,				     options->iv,				     options->packet_id,				     packet_id_long_form);      tls_adjust_frame_parameters(&frame);      /* Set all command-line TLS-related options */      CLEAR (to);      to.ssl_ctx = ks->ssl_ctx;      to.key_type = ks->key_type;      to.server = options->tls_server;      to.options = data_channel_options = options_string (options);      to.packet_id = options->packet_id;      to.packet_id_long_form = packet_id_long_form;      to.transition_window = options->transition_window;      to.handshake_window = options->handshake_window;      to.packet_timeout = options->tls_timeout;      to.renegotiate_bytes = options->renegotiate_bytes;      to.renegotiate_packets = options->renegotiate_packets;      to.renegotiate_seconds = options->renegotiate_seconds;      to.single_session = options->single_session;      to.disable_occ = options->disable_occ;      /* TLS handshake authentication (--tls-auth) */      if (options->tls_auth_file)	{	  to.tls_auth_key = ks->tls_auth_key;	  to.tls_auth.pid_persist = pid_persist;	  to.tls_auth.packet_id_long_form = true;	  crypto_adjust_frame_parameters(&to.frame,					 &ks->key_type,					 false,					 false,					 true,					 true);	}      /*       * Initialize OpenVPN's master TLS-mode object.       */      tls_multi = tls_multi_init (&to, &udp_socket);    }#endif  else    {      /*       * No encryption or authentication.       */      ASSERT (!options->test_crypto);      free_key_ctx_bi (&ks->static_key);      crypto_options.key_ctx_bi = &ks->static_key;      msg (M_WARN,	   "******* WARNING *******: all encryption and authentication features disabled -- all data will be tunnelled as cleartext");    }#else /* USE_CRYPTO */  msg (M_WARN,       "******* WARNING *******: OpenVPN built without OpenSSL -- encryption and authentication features disabled -- all data will be tunnelled as cleartext");#endif /* USE_CRYPTO */#ifdef USE_LZO  /*   * Initialize LZO compression library.   */  if (options->comp_lzo)    {      lzo_compress_init (&lzo_compwork, options->comp_lzo_adaptive);      lzo_adjust_frame_parameters (&frame);#ifdef FRAGMENT_ENABLE      lzo_adjust_frame_parameters (&frame_fragment_omit); /* omit LZO frame delta from final frame_fragment */#endif    }#endif  /*   * Adjust frame size based on the --tun-mtu-extra parameter.   */  tun_adjust_frame_parameters (&frame, options->tun_mtu_extra);  /*   * Fill in the blanks in the frame parameters structure,   * make sure values are rational, etc.   */  frame_finalize_options (&frame, options);  /*   * Set frame parameter for fragment code.  This is necessary because   * the fragmentation code deals with payloads which have already been   * passed through the compression code.   */#ifdef FRAGMENT_ENABLE  frame_fragment = frame;  frame_subtract_extra (&frame_fragment, &frame_fragment_omit);  frame_dynamic_finalize (&frame_fragment);#endif  max_rw_size_udp = MAX_RW_SIZE_UDP (&frame);  frame_print (&frame, D_MTU_INFO, "Data Channel MTU parms");#ifdef FRAGMENT_ENABLE  if (fragment)    frame_print (&frame_fragment, D_FRAG_DEBUG, "Fragmentation MTU parms");#endif#if defined(USE_CRYPTO) && defined(USE_SSL)  if (tls_multi)    {      int size;      tls_multi_init_finalize (tls_multi, &frame);      size = MAX_RW_SIZE_UDP (&tls_multi->opt.frame);      if (size > max_rw_size_udp)	max_rw_size_udp = size;      frame_print (&tls_multi->opt.frame, D_MTU_INFO, "Control Channel MTU parms");    }#endif  /*   * Now that we know all frame parameters, initialize   * our buffers.   */  read_udp_buf = alloc_buf (BUF_SIZE (&frame));  read_tun_buf = alloc_buf (BUF_SIZE (&frame));#ifdef USE_CRYPTO  encrypt_buf = alloc_buf (BUF_SIZE (&frame));  decrypt_buf = alloc_buf (BUF_SIZE (&frame));#endif#ifdef USE_LZO  if (options->comp_lzo)    {      lzo_compress_buf = alloc_buf (BUF_SIZE (&frame));      lzo_decompress_buf = alloc_buf (BUF_SIZE (&frame));    }#endif#ifdef FRAGMENT_ENABLE  /* fragmenting code has buffers to initialize once frame parameters are known */  if (fragment)    fragment_frame_init (fragment, &frame_fragment, (options->mtu_icmp && ipv4_tun));#endif  if (!tuntap_defined (tuntap))    {      /* do ifconfig */      if (ifconfig_order() == IFCONFIG_BEFORE_TUN_OPEN)	do_ifconfig (options->dev, options->dev_type,		     options->ifconfig_local, options->ifconfig_remote,		     TUN_MTU_SIZE (&frame));      /* open the tun device */      open_tun (options->dev, options->dev_type, options->dev_node, options->tun_ipv6, tuntap);      /* do ifconfig */        if (ifconfig_order() == IFCONFIG_AFTER_TUN_OPEN)	do_ifconfig (tuntap->actual, options->dev_type,		     options->ifconfig_local, options->ifconfig_remote,		     TUN_MTU_SIZE (&frame));      /* run the up script */      run_script (options->up_script, tuntap->actual, TUN_MTU_SIZE (&frame),		  max_rw_size_udp, options->ifconfig_local, options->ifconfig_remote);    }  else    {      msg (M_INFO, "Preserving previous TUN/TAP instance: %s", tuntap->actual);    }#ifdef HAVE_GETTIMEOFDAY  /* initialize traffic shaper (i.e. transmit bandwidth limiter) */  if (options->shaper)    {      shaper_init (&shaper, options->shaper);      shaper_msg (&shaper);    }#endif  if (first_time)    {      /* get user and/or group that we want to setuid/setgid to */      get_group (options->groupname, &group_state);      get_user (options->username, &user_state);      /* get --writepid file descriptor */      get_pid_file (options->writepid, &pid_state);      /* chroot if requested */      do_chroot (options->chroot_dir);    }  /* become a daemon if --daemon */  did_we_daemonize = possibly_become_daemon (1, options, first_time);#ifdef HAVE_SIGNAL_H  /* catch signals */  signal (SIGINT, signal_handler);  signal (SIGTERM, signal_handler);  signal (SIGHUP, signal_handler);  signal (SIGUSR1, signal_handler);  signal (SIGUSR2, signal_handler);#endif /* HAVE_SIGNAL_H */  if (first_time)    {      /* should we disable paging? */      if (options->mlock && did_we_daemonize)	do_mlockall (true); /* call again in case we daemonized */      /* set user and/or group that we want to setuid/setgid to */      set_group (&group_state);      set_user (&user_state);      /* save process ID in a file */      write_pid (&pid_state);      /* initialize threading if pthread configure option enabled */      thread_init();    }  /* start the TLS thread */#if defined(USE_CRYPTO) && defined(USE_SSL) && defined(USE_PTHREAD)  if (tls_multi)    tls_thread_create (&thread_parms, tls_multi, &udp_socket,		       options->nice_work, options->mlock);#endif  /* change scheduling priority if requested */  if (first_time)    set_nice (options->nice);  /*   * MAIN EVENT LOOP   *   * Pipe UDP -> tun and tun -> UDP using nonblocked i/o.   *   * If tls_multi is defined, multiplex a TLS   * control channel over the UDP connection which   * will be used for secure key exchange with our peer.   *   */  /* calculate max file handle + 1 for select */  fm = udp_socket.sd;  if (tuntap->fd > fm)    fm = tuntap->fd;  current = time (NULL);  /* initialize inactivity timeout */  if (options->inactivity_timeout)    event_timeout_init (&inactivity_interval, current, options->inactivity_timeout);  /* initialize pings */  if (options->ping_send_timeout)    {      ping_buf = alloc_buf (BUF_SIZE (&frame));      event_timeout_init (&ping_send_interval, 0, options->ping_send_timeout);    }  if (options->ping_rec_timeout)    event_timeout_init (&ping_rec_interval, current, options->ping_rec_timeout);#if defined(USE_CRYPTO) && defined(USE_SSL)#ifdef USE_PTHREAD  if (tls_multi && TLS_THREAD_SOCKET (&thread_parms) > fm)    fm = TLS_THREAD_SOCKET (&thread_parms);#else  /* initialize tmp_int optimization that limits the number of times we call     tls_multi_process in the main event loop */  interval_init (&tmp_int, TLS_MULTI_HORIZON, TLS_MULTI_REFRESH);#endif#endif  /* select() needs this */  ++fm;  /* this flag is true for buffers coming from the TLS background thread */  free_to_udp = false;  while (true)    {      int stat = 0;      struct timeval *tv = NULL;      struct timeval timeval;      /* initialize select() timeout */      timeval.tv_sec = 0;      timeval.tv_usec = 0;#ifdef USE_CRYPTO      /* flush current packet-id to file once per 60	 seconds if --replay-persist was specified */      packet_id_persist_flush (pid_persist, current, 60);#endif#if defined(USE_CRYPTO) && defined(USE_SSL) && !defined(USE_PTHREAD)      /*       * In TLS mode, let TLS level respond to any control-channel packets which were       * received, or prepare any packets for transmission.       *       * tmp_int is purely an optimization that allows us to call tls_multi_process       * less frequently when there's not much traffic on the control-channel.       *       */      if (tls_multi)	{	  interval_t wakeup = 0;	  if (interval_test (&tmp_int, current))	    {	      if (tls_multi_process (tls_multi, &to_udp, &to_udp_addr, &udp_socket, &wakeup, current))		interval_action (&tmp_int, current);	      interval_future_trigger (&tmp_int, wakeup, current);	      free_to_udp = false;	    }	  interval_schedule_wakeup (&tmp_int, current, &wakeup);	  if (wakeup)	    {	      timeval.tv_sec = wakeup;	      timeval.tv_usec = 0;	      tv = &timeval;	    }	}#endif      current = time (NULL);      /*       * Should we exit due to inactivity timeout?       */      if (options->inactivity_timeout)	{	  if (event_timeout_trigger (&inactivity_interval, current)) 	    {	      msg (M_INFO, "Inactivity timeout (--inactive), exiting");	      signal_received = 0;	      break;	    }	  event_timeout_wakeup (&inactivity_interval, current, &timeval);	  tv = &timeval;	}      /*       * Should we exit or restart due to ping (or other authenticated packet)       * not received in n seconds?       */      if (options->ping_rec_timeout &&	  (!options->ping_timer_remote || addr_defined (&udp_socket_addr->actual)))	{	  if (event_timeout_trigger (&ping_rec_interval, current)) 	    {	      switch (options->ping_rec_timeout_action)		{		case PING_EXIT:		  msg (M_INFO, "Inactivity timeout (--ping-exit), exiting");		  signal_received = 0;		  break;		case PING_RESTART:		  msg (M_INFO, "Inactivity timeout (--ping-restart), restarting");		  signal_received = SIGUSR1;		  break;		default:		  ASSERT (0);		}	      break;	    }	  event_timeout_wakeup (&ping_rec_interval, current, &timeval);	  tv = &timeval;	}#ifdef FRAGMENT_ENABLE      /*       * Should we deliver a datagram fragment to remote?       */      if (fragment)	{	  /* OS MTU Hint? */	  if (udp_socket.mtu_changed && ipv4_tun)	    {	      frame_adjust_path_mtu (&frame_fragment, udp_socket.mtu, ipv6_udp_transport);	      udp_socket.mtu_changed = false;	    }	  if (!to_udp.len	      && fragment_outgoing_defined (fragment)	      && fragment_ready_to_send (fragment, &buf, &frame_fragment))	    {#ifdef USE_CRYPTO#ifdef USE_SSL	      /*	       * If TLS mode, get the key we will use to encrypt	       * the packet.	       */	      mutex_lock (L_TLS);	      if (tls_multi)		tls_pre_encrypt (tls_multi, &buf, &crypto_options);#endif	      /*	       * Encrypt the packet and write an optional	       * HMAC authentication record.	       */	      openvpn_encrypt (&buf, encrypt_buf, &crypto_options, &frame, current);#endif	      /*	       * Get the address we will be sending the packet to.	       */	      udp_socket_get_outgoing_addr (&buf, &udp_socket,					    &to_udp_addr);#ifdef USE_CRYPTO#ifdef USE_SSL	      /*	       * In TLS mode, prepend the appropriate one-byte opcode	       * to the packet which identifies it as a data channel	       * packet and gives the low-permutation version of	       * the key-id to the recipient so it knows which	       * decrypt key to use.	       */	      if (tls_multi)		tls_post_encrypt (tls_multi, &buf);	      mutex_unlock (L_TLS);#endif#endif	      to_udp = buf;	      free_to_udp = false;	    }	  if (!to_tun.len && fragment_icmp (fragment, &buf))	    {	      to_tun = buf;	    }	  fragment_housekeeping (fragment, &frame_fragment, current, &timeval);	  tv = &timeval;	}#endif /* FRAGMENT_ENABLE */      /*       * Should we ping the remote?       */      if (options->ping_send_timeout)	{	  if (!to_udp.len)	    {	      if (event_timeout_trigger (&ping_send_interval, current))		{		  buf = ping_buf;		  ASSERT (buf_init (&buf, EXTRA_FRAME (&frame)));		  ASSERT (buf_safe (&buf, MAX_RW_SIZE_TUN (&frame)));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
波多野结衣亚洲一区| 91精品国产美女浴室洗澡无遮挡| 成人av资源下载| 欧洲国产伦久久久久久久| 日韩视频免费观看高清在线视频| 国产欧美精品区一区二区三区| 亚洲国产精品久久久男人的天堂| 国产真实乱对白精彩久久| 色婷婷综合久久久久中文| 精品国产91亚洲一区二区三区婷婷| 亚洲人成网站精品片在线观看| 免费在线成人网| 一本色道久久综合精品竹菊| 精品久久人人做人人爱| 亚洲午夜激情av| 97国产一区二区| 2020日本不卡一区二区视频| 亚洲va中文字幕| 一本色道久久综合狠狠躁的推荐 | 久久成人久久鬼色| 91猫先生在线| 国产精品免费av| 色天使色偷偷av一区二区| 精品国产人成亚洲区| 午夜成人免费电影| 一本久久精品一区二区| 亚洲欧洲性图库| 粉嫩久久99精品久久久久久夜| 欧美一区二区成人| 亚洲午夜国产一区99re久久| 色综合咪咪久久| 国产精品素人视频| 国产精品羞羞答答xxdd| 日韩欧美不卡在线观看视频| 日韩高清在线不卡| 欧美日韩另类国产亚洲欧美一级| 亚洲精品欧美二区三区中文字幕| av一区二区三区| 国产精品久久久久久久久免费丝袜 | 国产精品进线69影院| 韩日av一区二区| 精品国偷自产国产一区| 美女脱光内衣内裤视频久久影院| 欧美色网站导航| 亚洲国产精品一区二区尤物区| 色94色欧美sute亚洲线路一久| 国产精品久久久99| 成人99免费视频| 国产精品欧美久久久久无广告 | 亚洲午夜精品17c| 欧美日韩成人激情| 成人国产精品免费观看动漫| 国产精品久久久久久久岛一牛影视| 国产高清精品在线| 亚洲国产激情av| 色综合久久久久综合体桃花网| 亚洲色欲色欲www在线观看| 91麻豆精品视频| 亚洲午夜久久久久中文字幕久| 欧美三级电影一区| 奇米在线7777在线精品| 欧美电视剧免费观看| 国产精品一区二区三区网站| 国产精品麻豆一区二区| 色老汉一区二区三区| 亚洲国产乱码最新视频| 日韩一区二区免费电影| 国产成人精品一区二区三区网站观看| 日本一区二区免费在线| 91在线视频播放地址| 亚洲gay无套男同| 久久精品日韩一区二区三区| www.性欧美| 亚洲高清中文字幕| 久久伊99综合婷婷久久伊| 成人av午夜电影| 五月婷婷综合激情| 久久日一线二线三线suv| 91欧美一区二区| 喷白浆一区二区| 国产精品欧美综合在线| 欧美日韩一本到| 成人精品视频一区| 爽好久久久欧美精品| 国产日韩欧美不卡| 欧美视频在线观看一区二区| 国产专区欧美精品| 亚洲在线一区二区三区| 久久精品免费在线观看| 欧美无乱码久久久免费午夜一区 | 一区二区三区欧美| 欧美va日韩va| 欧美日本国产视频| av一二三不卡影片| 裸体健美xxxx欧美裸体表演| 亚洲日本一区二区三区| www国产精品av| 欧美日韩国产首页| 成人免费av资源| 韩国av一区二区三区在线观看| 亚洲最大成人综合| 日本一区二区三区dvd视频在线| 欧美一个色资源| 欧美午夜影院一区| 成人18视频在线播放| 激情成人综合网| 国产在线视频精品一区| 午夜国产精品一区| 一区二区三区欧美日| 中文字幕精品一区二区精品绿巨人| 日韩一卡二卡三卡国产欧美| 欧美日韩你懂得| 91极品美女在线| 91啪亚洲精品| 一本到一区二区三区| 国产成人免费视| 国产成人免费高清| 国产精品99久久久久久似苏梦涵 | 欧美mv和日韩mv的网站| 91麻豆精品国产91久久久久久久久| 91美女在线视频| 99精品黄色片免费大全| 99麻豆久久久国产精品免费| 高清不卡一二三区| 丰满少妇久久久久久久| 国产盗摄视频一区二区三区| 国产一区二区不卡| 国产精品996| 懂色av一区二区夜夜嗨| 国产91在线观看| 成人h动漫精品| 色综合av在线| 欧美日本韩国一区| 91精品国产色综合久久不卡电影 | 成人中文字幕合集| 丁香五精品蜜臀久久久久99网站| 国产精华液一区二区三区| 高清成人免费视频| 91视频在线观看免费| 91精品1区2区| 91精品在线一区二区| 日韩欧美成人一区| 国产情人综合久久777777| 国产精品视频一区二区三区不卡| 国产精品网站在线| 亚洲乱码日产精品bd| 亚洲国产一区在线观看| 男女性色大片免费观看一区二区| 在线欧美日韩国产| 欧美男男青年gay1069videost| 欧美一级二级三级蜜桃| 日本一区二区三区视频视频| 有码一区二区三区| 美女视频黄频大全不卡视频在线播放| 久久 天天综合| 97久久人人超碰| 日韩午夜激情电影| 国产精品久久久久一区二区三区共| 亚洲欧美欧美一区二区三区| 日韩福利电影在线| 国产99久久久国产精品潘金网站| 欧美日韩一区二区在线观看 | 麻豆精品国产91久久久久久| 国产成人自拍高清视频在线免费播放| 99精品视频一区二区| 91精品国产aⅴ一区二区| 久久久久久久久久久久久女国产乱| 日韩一区有码在线| 麻豆中文一区二区| 成人动漫一区二区| 日韩限制级电影在线观看| 国产精品乱人伦一区二区| 日韩国产精品91| 91女人视频在线观看| 日韩欧美亚洲另类制服综合在线 | 国产精品888| 欧美一区二区三区在线观看| 国产精品久久午夜夜伦鲁鲁| 日韩av午夜在线观看| 91免费看片在线观看| 亚洲一区自拍偷拍| 国产精品一区二区不卡| 欧美精品日日鲁夜夜添| 最新国产の精品合集bt伙计| 黄色精品一二区| 9191精品国产综合久久久久久| 日本一区二区三区电影| 久久精品国产精品青草| 欧美三级韩国三级日本三斤| 日韩一区在线播放| 国产精品一区三区| 欧美大肚乱孕交hd孕妇| 天天av天天翘天天综合网 | 亚洲欧美国产三级| 国产精品一卡二卡在线观看| 7777精品伊人久久久大香线蕉完整版| 亚洲欧美乱综合| 色综合久久久久综合体桃花网| 欧美激情一区二区三区蜜桃视频| 麻豆国产精品官网|